Smarts IP: How to create and use a script to show Unmanaged Interfaces and their Polling Group Configuration.
search cancel

Smarts IP: How to create and use a script to show Unmanaged Interfaces and their Polling Group Configuration.

book

Article ID: 345347

calendar_today

Updated On:

Products

VMware

Issue/Introduction

Using the sm_adapter command in Smarts allows users to run asl scripts against a domain.  This script will show the Unmanaged Interfaces in the IP domain and what Polling configuration group that they are in.

Symptoms:
How to create a script to collect the data on the Unmanaged Interfaces and the Polling Groups that are associated with these interfaces using the sm_adapter command and the following instructions.

Environment

VMware Smart Assurance - SMARTS

Resolution

Use below simple script, which will go through all groups in P&T with "Unmanaged Interfaces" in Name of group and print Criteria, members belonging to this group.

Create a new file called unmint.asl in <IP>/smarts/bin directory. Add below content into it, and save the file. 

/* To run - sm_adapter -s <IP DomainName> <ScriptName> */
/* f.e. sm_adapter -s <DomainName> unmint.asl */

START {
.. eol
} do {
 foreach sys (getInstances("ICF_ConfigurationSelector")) {
sysObj = object(sys);
// Specify criteria in below line
if (glob("*Unmanaged Interfaces*", sysObj->Name)) {
print("Configuration.... " . sysObj->Name);
print("Criteria.... " . sysObj->criteria . "\n");
sysMem = sysObj->ChildConfiguration;
sysMemObj = object(sysMem);
print(sysMemObj->Configures);
}
}
}


To execute the script, run below command:
<IP>/smarts/bin#./sm_adapter -s <IP_DomainName> unmint.asl > unmanageint.txt

The output unmanageint.txt will have the list of the unmanaged interfaces.

Additional Information

Impact/Risks:
No known risks identified. If the asl file created by the user has a syntax error, the sm_adapter executable will shut down and not complete the task.