VMWare Smart Assurance: Is there an XML adapter for VMWare Smart Assurance IP Availability Manager as there is for VMWare Smart Assurance SAM?; How can I export the AM / IP topology information?
search cancel

VMWare Smart Assurance: Is there an XML adapter for VMWare Smart Assurance IP Availability Manager as there is for VMWare Smart Assurance SAM?; How can I export the AM / IP topology information?

book

Article ID: 331736

calendar_today

Updated On:

Products

VMware Smart Assurance

Issue/Introduction

Symptoms:
Is there an XML adapter for VMWare Smart Assurance IP Availability Manager as there is for Smarts SAM?
How can I export the VMWare Smart Assurance IP Availability Manager AM / IP topology information?

Is it possible to export the VMWare Smart Assurance IP Availability Manager AM / IP topology information to an XML file as you can export notification information from the VMWare Smart Assurance Service Assurance Manager?

Environment

VMware Smart Assurance - SMARTS

Resolution

There is no XML adapter for VMWare Smart Assurance IP AM, it only exists for SAM. To export the VMWare Smart Assurance IP Availability Manager AM / IP topology information, you can use ASL to export the information to an Excel (*.xls) file.


Please see attached ASL Reference Guide and below for example ASL:


Example:

The below  ASL is delivered without warranties or guarantees and is used by the customer at their own risk and liability. VMWare assumes no responsibility for any part there of for the use of this script.

mObj = create("MonFetch", "mFetch");
default ClassName = "";
me=this->ReadsRulesFrom->fileName;

instrPack="";

START {
 ..eol
} do {

    /*
    print(""); 
    print("Usage: sm_adapter -s <serverName> -b <brokerLoc> -DClassName=<className> ".me);
    print("[Default mode runs on whole topology]");
    print(""); 
    */

    if (ClassName == "") {
       GET_TOPO_INSTR();
    } else {
       print(mObj->getInstrumentationMapping(ClassName));
    }
}

GET_TOPO_INSTR() do {
    print("<TopoMonitor>"); 
    foreach topoInst (getInstances("ICIM_UnitaryComputerSystem")){
 tObj = object(topoInst);
 sysOID = tObj->SystemObjectID;
 dName = tObj->Name;
 oData=sysOID.",".dName;
 print("<Device sysOID=\"".sysOID."\" name=\"".dName."\">");
 instrDeviceTable = table();
        foreach cRel (tObj->ComposedOf) {
    cRelObj = object(cRel);
    foreach instrRel (cRelObj->InstrumentedBy) {
        instrObj = object(instrRel);
        ClassName = instrObj->CreationClassName;
        if (!defined(instrDeviceTable[ClassName])) {
            instrDeviceTable[ClassName]=dName;       
        }       
       
    }
 }
 foreach className (instrDeviceTable) {
     attrData=list();
      print("<Class name=\"".className."\">");
     oidPack = mObj->getInstrumentationMapping(className);
     //attrData = PROCESS_OIDPACK(oidPack);
     attrData = PROCESS_OIDPACK(oidPack)? IGNORE;
     if (sizeOf(attrData)== 0 ) {
  print("</Class>");
  continue;
     }    
      print("<attributes>");
     foreach attr (attrData) {
         print("<attribute nameOID=\"".attr."\"\/>");
     }
      print("</attributes>");
      print("</Class>");
 }
 print("</Device>");
    }
    print("</TopoMonitor>"); 
}

PROCESS_OIDPACK(oidPack){
    input = oidPack; do {vBind=list(); }
    rep(var:word do {vBind += var; } )
}do {
    return vBind;
}