Modifying 'Matching Criteria' for a class in P&T (Polling and Threshold) from CLI
search cancel

Modifying 'Matching Criteria' for a class in P&T (Polling and Threshold) from CLI

book

Article ID: 386723

calendar_today

Updated On:

Products

VMware Telco Cloud Service Assurance VMware Smart Assurance

Issue/Introduction

Matching Criteria can be modified from GUI, in certain use case, users would like to make dynamic modification from CLI. 

Environment

Smarts - 10.1.x

Smarts-DM - 2.x

TCSA- 2.x

Resolution

  • Copy attached modifyMatchingCriteria.asl in the server where APM (Availability and Performance Manager)/CM (IP-Configuration Manager) service is running as per user's requirement. Example: /root
  • Assign execute permission to copied asl script. 
  • Navigate to bin directory of APM/CM and run ./sm_adapter -s <APM/CM> -DobjName="S-CFG-AggregatePortsGroup/AggregatePort" -DclassName="<ClassName>" -Dvalue="<Value to be matched>" /root/modifyMatchingCriteria.asl  | tee

Example:

[<Username>@<Hostname> bin]#./sm_adapter -s INCHARGE-AM-PM -DobjName="S-CFG-AggregatePortsGroup/AggregatePort" -DclassName="PrimaryOwnerContact" -Dvalue="ContactOne" /root/modifyMatchingCriteria.asl  | tee

In the example, for ClassName 'PrimaryOwnerContact', matching value passed is ContactOne.

  • Changes can be verified either from GUI or from CLI.
    • From GUI:
      • Navigate to P&T of domain, drill down to the class where changes are expected.

    • From CLI
      • From the same bin directory, run ./dmctl -s INCHARGE-AM-PM get 'ICF_ConfigurationSelector::S-CFG-AggregatePortsGroup/AggregatePort::criteria'| tee

Example:

[<Username>@<Hostname> bin]#./dmctl -s INCHARGE-AM-PM get 'ICF_ConfigurationSelector::S-CFG-AggregatePortsGroup/AggregatePort::criteria'| tee
{
 {
   CreationClassName
   AggregatePort
 }
 {
   PrimaryOwnerContact
   ContactOne
 }
}

Attachments

modifyMatchingCriteria.asl get_app