How to extract notifications from SMARTS Service Assurance Manager using the XML Adapter
search cancel

How to extract notifications from SMARTS Service Assurance Manager using the XML Adapter

book

Article ID: 322976

calendar_today

Updated On:

Products

VMware

Environment

VMware Smart Assurance - SMARTS

Resolution

How to extract notifications from SMARTS Service Assurance Manager using the XML Adapter



The following XML Adapter extraction script will get all ICS_Notification objects from the Service Assurance Manager domain named in the sm_xml command line:

xml-export-notifications-sample.asl
 
Copyright 2005, System Management ARTS (SMARTS)
All Rights Reserved
 
Sample Rule Set to export the topology of the ServiceSubscribers, the ServiceOfferings they are subscribed to, the Applications that these ServiceOfferings are composed Of, and the Hosts that Host these Applications from the server into an XML document that will confirm to the ICIM/XML DTD specifications.

This is a sample xml-export-*.asl file. Users should make copies of this file, and edit them according to their needs.  But they should always name these asl files according to the Naming convention, xml-export-<name>.asl
the XML_Builder object

default builderName = "";
aslname = " ".getRuleFileName().": ";
builder = self->object("XML_Builder", builderName)? LOG, STOP;
if (builder->isNull()) {
    print(aslname."ERROR: The Wrapper object has not been created.");
    stop();
}

NOTE: Customize the script from this point on.

START() {
    .. eol
    EXPORT_NOTIFICATION_INSTANCES
}

EXPORT_NOTIFICATION_INSTANCES {
    EXPORT_NOTIFICATIONS
}

EXPORT_NOTIFICATIONS {
} do {

Get all the instances of ICS_Notification class and add to the XML Document.

    notificationList = getInstances("ICIM_Notification")? LOG, NEXT;
    foreach notif (notificationList) {
        notifObj = object("ICIM_Notification", notif)? LOG, IGNORE;
        builder->addObject(notif, "ICIM_Notification");

Get all the attributes of the notification
        builder->addAttribute(notif, "Acknowledged");
        builder->addAttribute(notif, "Active");
        builder->addAttribute(notif, "Category");
        builder->addAttribute(notif, "Certainty");
        builder->addAttribute(notif, "ClassDisplayName");
        builder->addAttribute(notif, "ClassName");
        builder->addAttribute(notif, "ClearOnAcknowledge");
        builder->addAttribute(notif, "CreationClassName");
        builder->addAttribute(notif, "Description");
        builder->addAttribute(notif, "DisplayName");
        builder->addAttribute(notif, "ElementClassName");
        builder->addAttribute(notif, "ElementName");
        builder->addAttribute(notif, "EventDisplayName");
        builder->addAttribute(notif, "EventName");
        builder->addAttribute(notif, "EventText");
        builder->addAttribute(notif, "EventType");
        builder->addAttribute(notif, "FirstNotifiedAt");
        builder->addAttribute(notif, "Impact");
        builder->addAttribute(notif, "InMaintenance");
        builder->addAttribute(notif, "InstanceDisplayName");
        builder->addAttribute(notif, "InstanceName");
        builder->addAttribute(notif, "IsRoot");
        builder->addAttribute(notif, "LastChangedAt");
        builder->addAttribute(notif, "LastClearedAt");
        builder->addAttribute(notif, "LastNotifiedAt");
        builder->addAttribute(notif, "Name");
        builder->addAttribute(notif, "OccurrenceCount");
        builder->addAttribute(notif, "Owner");
        builder->addAttribute(notif, "ServiceName");
        builder->addAttribute(notif, "Severity");
        builder->addAttribute(notif, "SourceDomainName");
        builder->addAttribute(notif, "TroubleTicketID");
        builder->addAttribute(notif, "UserDefined1");
        builder->addAttribute(notif, "UserDefined2");
        builder->addAttribute(notif, "UserDefined3");
        builder->addAttribute(notif, "UserDefined4");
        builder->addAttribute(notif, "UserDefined5");
        builder->addAttribute(notif, "UserDefined6");
        builder->addAttribute(notif, "UserDefined7");
        builder->addAttribute(notif, "UserDefined8");
        builder->addAttribute(notif, "UserDefined9");
        builder->addAttribute(notif, "UserDefined10");

        builder->addObjectClosing();
    }
}

Additional Information

Please refer to the XML Adapter User   s Guide for complete information on using the XML Adapter.