To add alerts using an XML file, run the GCEventAddCmd batch program with the XML file that contains the <Event> tag and appropriate property tags with corresponding values. The template tag structure is as follows:
<Events> <Event> … … </Event> </Events>
Note: For a complete list of USM property tags, see the USM schema to determine which USM properties are required for the specific class of CI.
The following example lets you add an alert of Minor severity by running the batch program as follows:
GCEventAddCmd -hSOIserver.ca.com:7090 -fAddAlert.xml
The example uses the AddAlert.xml file that includes the following information about the alert:
<Events> <Event> <property tag="eventType" value="StatusEvent" /> <property tag="MdrElementID" value="A00001" /> <property tag="className" value="Alert" /> <property tag="AlertedMdrElementID" value="UCServer" /> <property tag="AlertType" value="Risk" /> <property tag="Severity" value="Minor" /> <property tag="Summary" value="UC_Server has an infrastructure alarm.." /> <property tag="Message" value="The Detailed message associated with this alert.." /> </Event> </Events>
The parameters used in this example XML file are as follows:
Specifies the type of event. In the case of alert, the value is StatusEvent.
Specifies a unique alert ID. For this example, the value is A00001.
Specifies the USM class name. For this example, the value is Alert.
Specifies the AlertedMdrElementID, which is the MdrElementID of the CI that the alert is associated with. For this example, the value is UCServer.
Specifies the type of alert: Risk, Quality, or Health. For this example, the value is Risk.
Specifies the alert severity. For this example, the value is Minor.
Specifies the appropriate summary text that you want to display. For this example, the value is "UC_Server has an infrastructure alarm..".
Specifies the appropriate message text that you want to display. For this example, the value is "The Detailed message associated with this alert..".
|
Copyright © 2013 CA.
All rights reserved.
|
|