Smarts AM: How to unmanage specific IP addresses or specific IP address ranges automatically during discovery
search cancel

Smarts AM: How to unmanage specific IP addresses or specific IP address ranges automatically during discovery

book

Article ID: 303821

calendar_today

Updated On:

Products

VMware

Issue/Introduction

Symptoms:
Smarts AM: How to unmanage specific IP addresses or specific IP address ranges automatically during discovery

Environment

VMware Smart Assurance - SMARTS

Resolution

How to unmanage specific IP addresses or specific IP address ranges automatically during discovery in Smarts AM
How can I not manage certain IP addresses but still manage the interface?



 

If you do not want to manage specific IP addresses or specific IP address ranges by pinging through ICMP or polling through SNMP, they can be unmanaged automatically during discovery.  This is done by defining rules in the custom-end-system.asl which is called at the end of every device discovery as follows:

  1. Use sm_edit to open the custom-end-system.asl script for editing as follows: 

    <BASEDIR>/IP/smarts/bin/sm_edit rules/discovery/custom/custom-end-system.asl

     
  2. Add the code required to the script to unmanage the IP addresses as shown in the sample in the following section of this Fix statement. Save and close the custom-end-system.asl script.
  3. Restart the domain server to make the changes take effect.

Addiing code to custom-end-system.asl script to unmanage IP addresses
The following is a sample of code which will unmanage IP addresses that end in .254 on Routers:

START {
    /*
     * Add Parsing rules here.
     */
    .. eol
} do {
    /*
     * Add processing rules here.
     */
       if (nodeObj->CreationClassName == "Router" ){
               foreach IP (nodeObj->getIPs()) {
                       IPObj = object(IP);
                       if ( !IPObj->isNull() && glob("<1-255>.<0-255>.<0-255>.254", IPObj->Address) && IPObj->IsManaged ) {
                            IPObj->unmanage();
                            if ( DEBUG ) { print(me . " Support:". IPObj->Address . " is now unmanaged"); }
                       }
               }
      }
    stop();
}