Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Best Practices for Customizing xMatters Integrations with HP Operations Manager and Network Node Manager
Aaron Magi, Integrations Lead Engineer amagi@xMatters.com
OVERVIEW
Questions at the end of each section Presentation Slides and Videos will be available after the conference
NNMI 9
Communication for NNMi 1.WS Eventing 1. NNMi uses WS Eventing to communicate to AlarmPoint 2. When the AlarmPoint webserver starts up it runs a servlet 1. The servlet creates a WS Eventing Subscription to NNMi 2. This subscription is based off nnmi.properties 1. The properties file associates which types of events the subscription is targeted for 3. When an event occurs in NNMi that matches the WS Eventing subscription the event details are sent to AlarmPoint 1. The servlet receives the Web Service call from NNMi 2. The call is then put though a XSL transform (NNM2APEvent.xsl) 3. The XML data is then used to create a SOAP Web Service call to AlarmPoint to inject a new event
ALARM POINT
AlarmPoint receives the SOAP request and creates an event AlarmPoint loads the AlarmPoint Scripts Initial script processes the event Presentation script is loaded to create the presentation details and response choices for users devices
ALARM POINT BA CK TO N NM I
AlarmPoint users reply on their device Response script is loaded and processes the response The response script calls NetworkNodeManagerScriptObject This is an AlarmPoint written java wrapper which sends web service requests to NNMi to update the Incident AlarmPoint sends a web service request to NNMi using WS-I APIs for Incident (reference NNM-SDK9.0.pdf) Own (updateAssignedTo, this API update was introduced by the NNMi team upon a request by AlarmPoint) Change Priority Close Annotate
1. 2. 3. 4. 5. 6.
A User sends a request from a mobile device to the AlarmPoint Mobile Gateway. The Mobile Gateway processes the request and relays instructions to the AlarmPoint Integration Agent. The Integration Agent communicates via a Java Wrapper, which interacts with Axis2 Java Service Stubs making requests to NNMi. The response is sent back to the Integration Agent though the Java Wrapper. The Integration Agent processes the response and sends it back to the Mobile Gateway. Rendered results are sent back to the mobile device.
HP NNMI
Error detected by NNMi. NNMi asks AlarmPoint to go hunt down users in the appropriate group
10
The Notes show who was notified, when they were notified and how they were notified
HP NNMI
and response choices to begin resolving the event
11
12
The response choices change the State as well as provide annotation for who, when and how
13
14
OMW 8.10
1. 2. 3. 4. 5. 6.
When an event occurs on a system monitored by HP Operations Manager, OM-W creates a message which triggers the Forward Messages to AlarmPoint policy. If the Policys conditions are true (the default setting is for any message of Critical severity), the message details are sent to omw.vbs. The enriched details are then sent to the AlarmPoint Integration Agent using an AlarmPoint AddEvent via HTTP POST. The Integration Agent sends the event to AlarmPoint, which in turn notifies the Group defined in the originating messages Message Group field. The notification response returns from AlarmPoint to the Integration Agent, which sends an OM-W Request to OmwApt.vbs via Response Action Scripting. OmwApt.vbs sends a remote WMI action to OM-W to update the message.
15
We expect that customers will create multiple Policies and will use these as templates
16
17
VBS scripts receive the attributes from the Policy and send the data to the Integration Agent via HTTP POST
18
19
AlarmPoint users reply on their device Response script is loaded and processes the response External service message/request is sent to Integration Agent Includes request_text (method to call) and message_text (annotation) Integration Agent process request The request is processed and a command is run to pass the details to OmwApt.vbs OmwApt.vbs sends a remote WMI action to OM-W to update the message The actions are based off the OV_Message WMI API Acknowledge Own Change Severity Annotate
20
Error detected by OVO. OVO asks AlarmPoint to go hunt down users in the Operations group. Event annotated to show process.
As AlarmPoint notifies Operations staff the event is annotated showing the specific notification that was sent out.
21
Notification shows problem text and provides response options such as Acknowledge or Note (to add free text annotations).
22
And the time and user are stored so you can see who performed the action.
Users response causes changes to the event, in this case the event was Acknowledged by the user.
23
24
Questions?
25
In-depth Training
1. Extend the integration to add new data to be sent from NNMi to xMatters 2. Extend NNMi to allow creation of Incident tickets within HP Service Manager
26
27
28
29
NNM2APEVENT.XSL UPDATES
30
NNM2APEvent.xsl
31
32
Update the AlarmPoint Presentation Scripts to show the new attribute on the notifications
Start up the AlarmPoint Developer IDE Go to the presentation scripts Add the new attribute for email and bes
N E W BE S NOTIFICATION
33
VIDEO
34
35
Questions
36
Areas of interest
JSPs within the Service Manager xMatters Mobile Gateway URLAlias.jsp (Runs on the xMatters Web Server) CreateFields.jsp (Runs on the xMatters Web Server)
37
38
39
Check URLAlias.jsp
CREATEFIELDS.JSP
40
41
42
CREATE SM INCIDENT
43
SERVICE MA NA GER I NC ID EN T
44
VIDEO
45
46
Questions?
47
Section 3: Add a new Response Choice Extend the integration to create a new response to allow for disowning an event.
48
Open the HP Operations Manager Windows manual (hp_man_OMW8.1_Online_Help_pdf.pdf). We will be extending the integration to add a new response, disown, using the WMI Methods, in particular the OV_Message object. OV_Message::Acknowledge() 1520 OV_Message::AddAnnotation() 1521 OV_Message::ChangeSeverity() 1522 OV_Message::ChangeText() 1523 OV_Message::DeleteAnnotation() 1524 OV_Message::Disown() 1525 OV_Message::GetAnnotation() 1526 OV_Message::GetAnnotationArray() 1527 OV_Message::GetInstruction() 1529 OV_Message::GetOriginalText() 1530 OV_Message::GetServerList() 1531 OV_Message::GetStoredDuplicate() 1532 OV_Message::GetStoredDuplicateArray() 1533 OV_Message::ModifyAnnotation() 1535 OV_Message::Own() 1536 OV_Message::SetCMAs() 1537 OV_Message::Unacknowledge() 1538
49
NEXT STEPS
50
1. Add the response to the presentation script 2. Add the response handling to the response script 3. Add the disown handling to the Integration Agent (hpomw.js) 4. Add a new method for disown within OmwApt.vbs.
51
Update the presentation scripts to add the disown response for all device types. Solution: # Configure Notification Response Choices IF ( ! $main.fyi ) IF ( ( $content.deviceclassification == "email" ) || ( $content.deviceclassification == "bes" ) || ( $content.deviceclassification == "browser" )) # Set response choices for non-fyi Email and BES Devices. $content.choices = "Acknowledge" $content.choices::add( "Own" ) $content.choices::add( "Disown" ) $content.choices::add( "Ignore" ) $content.choices::add( "Change Sev Critical" ) $content.choices::add( "Change Sev Major" ) $content.choices::add( "Change Sev Minor" ) $content.choices::add( "Change Sev Warning" ) $content.choices::add( "Change Sev Normal" ) ELSE # Set Shorter Choices for Mobile Devices $content.choices = "Ack" $content.choices::add( "Disown" ) $content.choices::add( "Own" ) $content.choices::add( "Ign" ) ENDIF ENDIF
52
Update the response script to handle the disown response Update checking for which response was sent Create a new section to process the disown Model this after the own update the annotation ($message_note) Update the method to call on the integration agent ($request_text) to ApOmwDisown Code: $message_note = "Disowned by " & $responder_name IF ( $main.debug ) @script::log( $main.log_prepend & $message_note ) ENDIF # Own OM-W Event @ownRequest = @event::createExternalServiceMessage() $ownRequest.request_text = "ApOmwDisown" $ownRequest.omw_owner = $omwOwner $ownRequest.omw_password = $omwPassword @ownRequest::send()
53
Open hpomw.js Add the response handling for the request_text ApOmwDisown
The disown will need to setup the command list and execute based on the command list, incident id and request text
else if (requestText.equalsIgnoreCase("ApOmwDisown")) { if (requestOwner) { commandList = commandList.concat([ requestText, "-arg1", requestOwner, "-arg2", "\"" + messageText + "\"", "-omwuser", "\"" + omwOwner + "\"", "-omwpassword", "\"" + omwPassword + "\"" ]); execute(commandList, incidentId, requestText); } else { ServiceAPI.getLogger().error("Agent Client: hp_operations_manager_win - Request Script Failed for (" + requestText + "/" + incidentId + "): No User Specified to Own the Incident."); } }
54
OmwApts.vbs is called by the Integration Agent to make the remote WMI calls to OMW Update the VBS script to process the ApOmwDisown request text and call a new VBS sub method DisownOmwMessage() Create DisownOmwMessage() method Refer to the manual HP Operations Manager Windows manual (hp_man_OMW8.1_Online_Help_pdf.pdf). Find the WMI section for OV_Message Instance Methods, find the one you want to use for Disown Once you find this method go see what parameters it takes and its return values Create the WMI call based off the parameters required
C H A N G E S T O T H E VB S SCRIPT
55
NOTIFICATION
56
VIDEO
57
58
Questions
59
60
Questions?
VIDEO
61
Extra slides
ADDING IMA GES TO TH E WEB SER VER AND UPDATING TH E PR ESENTATION S CRIP TS
62
63
Section 2: In-depth Training Allow users to Ping the NNMi source node
Determine how to leverage the xMatters Ping integration Test a HTTP Post to the Integration Agent Update the NNMi Presentration script to create a new link which performs a HTTP Post to the Integration Agent
64
Go to the integration agent and look at the ping integration (ping.xml) Determine the required parameters the integration needs
65
Update the presentation script to allow users to ping the source node
Set the required parameters for the ping script Integration name ping User to target for the notification person.targetName Address to ping event.sourceObjectName
NOTIFICATION
66
VIDEO
67
QUESTIONS
68
QUESTIONS
69