SOI Notifications

In order to receive notifications from SOI, ServiceNow must send a Notification Subscription request to SOI on a periodic basis stating that the instance would like to receive SOAP message posts on alert creation, update, and deletion. Also, the subscription request provides a URL that will be expecting the SOAP POST from CA.

This is accomplished by a Scheduled Job, "SOI-SubscribeToNotifications". By default, this job runs every 9 minutes as that was the subscription duration set by the installation that this was developed against.

There are two types of subscriptions in SOI, a push and a pull. We use the Push method in this PoV integration. In the Push method, CA sends the SOAP notifications to ServiceNow as they happen. In a Pull scenario, ServiceNow has to query a notification queue on a scheduled basis.

Sample SOAP Message for a Push Subscription Request to SOI

<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"
xmlns:mdo="http://schemas.wiseman.dev.java.net/metadata/messagetypes"
 xmlns:mex="http://schemas.xmlsoap.org/ws/2004/09/mex"
 xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"
 xmlns:wse="http://schemas.xmlsoap.org/ws/2004/08/eventing"
 xmlns:wsen="http://schemas.xmlsoap.org/ws/2004/09/enumeration"
 xmlns:wsman="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"
 xmlns:wsmeta="http://schemas.dmtf.org/wbem/wsman/1/wsman/version1.0.0.a/default-addressing-model.xsd"
 xmlns:wxf="http://schemas.xmlsoap.org/ws/2004/09/transfer" xmlns:xs="http://www.w3.org/2001/XMLSchema">
 <env:Header>
   <wsa:To env:mustUnderstand="true" xmlns=""
     xmlns:ns11="http://schemas.sam.ca.com/webservice/1/alarm.xsd"
     xmlns:ns13="http://ns.ca.com/2009/01/usm-data"
     xmlns:ns14="http://ns.ca.com/2009/07/usm-core" xmlns:ns15="http://ns.ca.com/2009/07/eventing">http://MYSERVER:7090/sam/webservice</wsa:To>
   <wsman:ResourceURI xmlns=""
     xmlns:ns11="http://schemas.sam.ca.com/webservice/1/alarm.xsd"
     xmlns:ns13="http://ns.ca.com/2009/01/usm-data"
     xmlns:ns14="http://ns.ca.com/2009/07/usm-core" xmlns:ns15="http://ns.ca.com/2009/07/eventing">http://ns.ca.com/2009/07/usm-core/Notification</wsman:ResourceURI>
   <wsa:Action env:mustUnderstand="true" xmlns=""
     xmlns:ns11="http://schemas.sam.ca.com/webservice/1/alarm.xsd"
     xmlns:ns13="http://ns.ca.com/2009/01/usm-data"
     xmlns:ns14="http://ns.ca.com/2009/07/usm-core" xmlns:ns15="http://ns.ca.com/2009/07/eventing">http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe</wsa:Action>
   <wsa:ReplyTo xmlns=""
     xmlns:ns11="http://schemas.sam.ca.com/webservice/1/alarm.xsd"
     xmlns:ns13="http://ns.ca.com/2009/01/usm-data"
     xmlns:ns14="http://ns.ca.com/2009/07/usm-core" xmlns:ns15="http://ns.ca.com/2009/07/eventing">
     <wsa:Address env:mustUnderstand="true">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:Address>
   </wsa:ReplyTo>
   <wsa:MessageID env:mustUnderstand="true" xmlns=""
     xmlns:ns11="http://schemas.sam.ca.com/webservice/1/alarm.xsd"
     xmlns:ns13="http://ns.ca.com/2009/01/usm-data"
     xmlns:ns14="http://ns.ca.com/2009/07/usm-core" xmlns:ns15="http://ns.ca.com/2009/07/eventing">uuid:b01b6484-62fb-4238-8c90-c83a7396dc29</wsa:MessageID>
 </env:Header>
 <env:Body>
   <wse:Subscribe xmlns=""
     xmlns:ns11="http://schemas.sam.ca.com/webservice/1/alarm.xsd"
     xmlns:ns13="http://ns.ca.com/2009/01/usm-data"
     xmlns:ns14="http://ns.ca.com/2009/07/usm-core" xmlns:ns15="http://ns.ca.com/2009/07/eventing">
     <wse:EndTo>
       <wsa:Address env:mustUnderstand="true">http://myinstance.service-now.com/soi.do</wsa:Address>
     </wse:EndTo>
     <wse:Delivery Mode="http://schemas.xmlsoap.org/ws/2004/08/eventing/DeliveryModes/Push">
       <wse:NotifyTo>
         <wsa:Address env:mustUnderstand="true">http://myinstance.service-now.com/soi.do</wsa:Address>
       </wse:NotifyTo>
     </wse:Delivery>
     <wse:Filter Dialect="http://ns.ca.com/2009/07/usm-core/EntityChanges">alertCreated;alertModified;alertCleared</wse:Filter>
     <wsman:Bookmark>
       <ns15:Bookmark>http://schemas.dmtf.org/wbem/wsman/1/wsman/bookmark/earliest</ns15:Bookmark>
     </wsman:Bookmark>
   </wse:Subscribe>
 </env:Body>
</env:Envelope>

Sample Response for a Push Subscription Request to SOI

<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"
xmlns:mdo="http://schemas.wiseman.dev.java.net/metadata/messagetypes"
 xmlns:mex="http://schemas.xmlsoap.org/ws/2004/09/mex"
 xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"
 xmlns:wse="http://schemas.xmlsoap.org/ws/2004/08/eventing"
 xmlns:wsen="http://schemas.xmlsoap.org/ws/2004/09/enumeration"
 xmlns:wsman="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"
 xmlns:wsmeta="http://schemas.dmtf.org/wbem/wsman/1/wsman/version1.0.0.a/default-addressing-model.xsd"
 xmlns:wxf="http://schemas.xmlsoap.org/ws/2004/09/transfer" xmlns:xs="http://www.w3.org/2001/XMLSchema">
 <env:Header>
   <wsa:Action env:mustUnderstand="true" xmlns=""
     xmlns:ns11="http://schemas.sam.ca.com/webservice/1/alarm.xsd"
     xmlns:ns13="http://ns.ca.com/2009/01/usm-data"
     xmlns:ns14="http://ns.ca.com/2009/07/usm-core" xmlns:ns15="http://ns.ca.com/2009/07/eventing">http://schemas.xmlsoap.org/ws/2004/08/eventing/SubscribeResponse</wsa:Action>
   <wsa:MessageID env:mustUnderstand="true" xmlns=""
     xmlns:ns11="http://schemas.sam.ca.com/webservice/1/alarm.xsd"
     xmlns:ns13="http://ns.ca.com/2009/01/usm-data"
     xmlns:ns14="http://ns.ca.com/2009/07/usm-core" xmlns:ns15="http://ns.ca.com/2009/07/eventing">uuid:d70112ea-636d-4d1a-938a-123e63c94bd1</wsa:MessageID>
   <wsa:RelatesTo xmlns=""
     xmlns:ns11="http://schemas.sam.ca.com/webservice/1/alarm.xsd"
     xmlns:ns13="http://ns.ca.com/2009/01/usm-data"
     xmlns:ns14="http://ns.ca.com/2009/07/usm-core" xmlns:ns15="http://ns.ca.com/2009/07/eventing">uuid:b01b6484-62fb-4238-8c90-c83a7396dc29</wsa:RelatesTo>
   <wsa:To env:mustUnderstand="true" xmlns=""
     xmlns:ns11="http://schemas.sam.ca.com/webservice/1/alarm.xsd"
     xmlns:ns13="http://ns.ca.com/2009/01/usm-data"
     xmlns:ns14="http://ns.ca.com/2009/07/usm-core" xmlns:ns15="http://ns.ca.com/2009/07/eventing">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:To>
 </env:Header>
 <env:Body>
   <wse:SubscribeResponse xmlns=""
     xmlns:ns11="http://schemas.sam.ca.com/webservice/1/alarm.xsd"
     xmlns:ns13="http://ns.ca.com/2009/01/usm-data"
     xmlns:ns14="http://ns.ca.com/2009/07/usm-core" xmlns:ns15="http://ns.ca.com/2009/07/eventing">
     <wse:SubscriptionManager>
       <wsa:Address env:mustUnderstand="true">http://MYSERVER:7090/sam/webservice/</wsa:Address>
       <wsa:ReferenceParameters>
         <wsman:ResourceURI>http://ns.ca.com/2009/07/usm-core/Notification</wsman:ResourceURI>
         <wse:Identifier>e913100e-d725-41b2-93f7-c7cb93cb61df</wse:Identifier>
       </wsa:ReferenceParameters>
     </wse:SubscriptionManager>
     <wse:Expires>2012-09-04T08:03:36.593-07:00</wse:Expires>
   </wse:SubscribeResponse>
 </env:Body>
</env:Envelope>

Once the subscriptions have been requested, CA will start to POST SOAP requests to the "Inbound processor URL for inbound subscription notifications" setting (see the Settings module). There is a public Inbound Processor script that is set up to handle the SOAP XML coming in for the three event types from CA. This processor is a public script since the subscription service doesn't appear to be able to send a POST with Basic Authentication. For actual implementations, security precautions should be put in place to limit the processing of messages from unauthorized sources.

Sample "AlertCreated" POST from CA to ServiceNow

<?xml version="1.0"?> <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:mdo="http://schemas.wiseman.dev.java.net/metadata/messagetypes" xmlns:mex="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wse="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:wsen="http://schemas.xmlsoap.org/ws/2004/09/enumeration" xmlns:wsman="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" xmlns:wsmeta="http://schemas.dmtf.org/wbem/wsman/1/wsman/version1.0.0.a/default-addressing-model.xsd" xmlns:wxf="http://schemas.xmlsoap.org/ws/2004/09/transfer" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<env:Header>
   <wsa:Action xmlns:ns11="http://schemas.sam.ca.com/webservice/1/alarm.xsd" xmlns:ns13="http://ns.ca.com/2009/01/usm-data" xmlns:ns14="http://ns.ca.com/2009/07/usm-core" xmlns:ns15="http://ns.ca.com/2009/07/eventing" xmlns="" env:mustUnderstand="true">http://schemas.dmtf.org/wbem/wsman/1/wsman/Event</wsa:Action>
   <wsa:To xmlns:ns11="http://schemas.sam.ca.com/webservice/1/alarm.xsd" xmlns:ns13="http://ns.ca.com/2009/01/usm-data" xmlns:ns14="http://ns.ca.com/2009/07/usm-core" xmlns:ns15="http://ns.ca.com/2009/07/eventing" xmlns="" env:mustUnderstand="true">http://www.anthemflag.com/casoi.php</wsa:To>
   <wsa:MessageID xmlns:ns11="http://schemas.sam.ca.com/webservice/1/alarm.xsd" xmlns:ns13="http://ns.ca.com/2009/01/usm-data" xmlns:ns14="http://ns.ca.com/2009/07/usm-core" xmlns:ns15="http://ns.ca.com/2009/07/eventing" xmlns="" env:mustUnderstand="true">urn:uuid:7aceb462-af79-4d12-9fff-c27ed26d477c</wsa:MessageID>
 </env:Header>
 <env:Body>
   <ns14:AlertCreated xmlns:ns14="http://ns.ca.com/2009/07/usm-core" xmlns:ns11="http://schemas.sam.ca.com/webservice/1/alarm.xsd" xmlns:ns13="http://ns.ca.com/2009/01/usm-data" xmlns:ns15="http://ns.ca.com/2009/07/eventing" xmlns="">
     <ns14:MdrProduct>CA:00004</ns14:MdrProduct>
     <ns14:MdrProdInstance>DOJSDAM0001</ns14:MdrProdInstance>
     <ns14:MdrElementID>113501</ns14:MdrElementID>
     <ns14:Description>BAD LINK DETECTED</ns14:Description>
     <ns14:NewValues name="AlertedMdrProdInstance">DOJSDAM0001</ns14:NewValues>
     <ns14:NewValues name="AlertedMdrProduct">CA:00004</ns14:NewValues>
     <ns14:NewValues name="AlertedMdrElementID">1</ns14:NewValues>
     <ns14:NewValues name="ssa_instance_id"/>
     <ns14:NewValues name="Severity">Critical</ns14:NewValues>
     <ns14:NewValues name="OccurrenceTimestamp">2012-09-06T11:16:26.677-07:00</ns14:NewValues>
     <ns14:NewValues name="ssa_classname">SA_PORT</ns14:NewValues>
     <ns14:NewValues name="ssa_connector_id">10</ns14:NewValues>
     <ns14:NewValues name="ssa_connector_name">SpectrumInfrastructureManager running on host Spectrum-dc00001dlv01.mycompany.com</ns14:NewValues>
     <ns14:NewValues name="Message">The link status of port (name - MITRSWACC01_Gi9/40, type - Gen_IF_Port) is now "bad".</ns14:NewValues>
     <ns14:NewValues name="IsAcknowledged">false</ns14:NewValues>
     <ns14:NewValues name="RelatedIncident"/>
     <ns14:NewValues name="ssa_ticket_props"/>
     <ns14:NewValues name="ssa_ticket_id_url"/>
     <ns14:NewValues name="ssa_ticket_url"/>
     <ns14:NewValues name="Assignee"/>
     <ns14:NewValues name="ssa_userattribute_1"/>
     <ns14:NewValues name="ssa_userattribute_2"/>
     <ns14:NewValues name="ssa_userattribute_3"/>
     <ns14:NewValues name="ssa_userattribute_4"/>
     <ns14:NewValues name="ssa_userattribute_5"/>
     <ns14:NewValues name="ReportTimestamp">2012-09-06T09:55:15.000-07:00</ns14:NewValues>
     <ns14:NewValues name="UrlParams"/>
     <ns14:NewValues name="AlertType">Risk-Fault</ns14:NewValues>
     <ns14:NewValues name="RetireTimestamp">Thu Sep 06 11:16:26 PDT 2012</ns14:NewValues>
     <ns14:NewValues name="ssa_is_rootcause">false</ns14:NewValues>
     <ns14:NewValues name="ssa_domain_id">4503599627370496</ns14:NewValues>
     <ns14:NewValues name="ssa_queue_id">3</ns14:NewValues>
     <ns14:NewValues name="ssa_queue_id">5</ns14:NewValues>
   </ns14:AlertCreated>
 </env:Body>
</env:Envelope>

Sample "AlertCleared" POST from CA to ServiceNow

<?xml version="1.0"?> <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:mdo="http://schemas.wiseman.dev.java.net/metadata/messagetypes" xmlns:mex="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wse="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:wsen="http://schemas.xmlsoap.org/ws/2004/09/enumeration" xmlns:wsman="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" xmlns:wsmeta="http://schemas.dmtf.org/wbem/wsman/1/wsman/version1.0.0.a/default-addressing-model.xsd" xmlns:wxf="http://schemas.xmlsoap.org/ws/2004/09/transfer" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<env:Header>
   <wsa:Action xmlns:ns11="http://schemas.sam.ca.com/webservice/1/alarm.xsd" xmlns:ns13="http://ns.ca.com/2009/01/usm-data" xmlns:ns14="http://ns.ca.com/2009/07/usm-core" xmlns:ns15="http://ns.ca.com/2009/07/eventing" xmlns="" env:mustUnderstand="true">http://schemas.dmtf.org/wbem/wsman/1/wsman/Event</wsa:Action>
   <wsa:To xmlns:ns11="http://schemas.sam.ca.com/webservice/1/alarm.xsd" xmlns:ns13="http://ns.ca.com/2009/01/usm-data" xmlns:ns14="http://ns.ca.com/2009/07/usm-core" xmlns:ns15="http://ns.ca.com/2009/07/eventing" xmlns="" env:mustUnderstand="true">http://www.anthemflag.com/casoi.php</wsa:To>
   <wsa:MessageID xmlns:ns11="http://schemas.sam.ca.com/webservice/1/alarm.xsd" xmlns:ns13="http://ns.ca.com/2009/01/usm-data" xmlns:ns14="http://ns.ca.com/2009/07/usm-core" xmlns:ns15="http://ns.ca.com/2009/07/eventing" xmlns="" env:mustUnderstand="true">urn:uuid:1a2448c6-d8e4-4ef7-a6fa-a5fd7b474874</wsa:MessageID>
 </env:Header>
 <env:Body>
   <ns14:AlertCleared xmlns:ns14="http://ns.ca.com/2009/07/usm-core" xmlns:ns11="http://schemas.sam.ca.com/webservice/1/alarm.xsd" xmlns:ns13="http://ns.ca.com/2009/01/usm-data" xmlns:ns15="http://ns.ca.com/2009/07/eventing" xmlns="">
     <ns14:MdrProduct>CA:00004</ns14:MdrProduct>
     <ns14:MdrProdInstance>DEVICE0136</ns14:MdrProdInstance>
     <ns14:MdrElementID>113472</ns14:MdrElementID>
     <ns14:Description>DEVICE HAS STOPPED RESPONDING TO POLLS</ns14:Description>
     <ns14:NewValues name="AlertedMdrProdInstance">DEVICE0136</ns14:NewValues>
     <ns14:NewValues name="AlertedMdrProduct">CA:00004</ns14:NewValues>
     <ns14:NewValues name="AlertedMdrElementID">1</ns14:NewValues>
     <ns14:NewValues name="ssa_instance_id"/>
     <ns14:NewValues name="Severity">Critical</ns14:NewValues>
     <ns14:NewValues name="OccurrenceTimestamp">Thu Sep 06 11:12:26 PDT 2012</ns14:NewValues>
     <ns14:NewValues name="ssa_classname">SA_Server</ns14:NewValues>
     <ns14:NewValues name="ssa_connector_id">10</ns14:NewValues>
     <ns14:NewValues name="ssa_connector_name">SpectrumInfrastructureManager running on host Spectrum-DC091SPEC1.mycompany.com</ns14:NewValues>
     <ns14:NewValues name="Message">Device DEVICE0136.mycompany.com of type Host_Device has stopped responding to polls and/or external requests. An alarm will be generated.</ns14:NewValues>
     <ns14:NewValues name="IsAcknowledged">false</ns14:NewValues>
     <ns14:NewValues name="RelatedIncident"/>
     <ns14:NewValues name="ssa_ticket_props"/>
     <ns14:NewValues name="Assignee"/>
     <ns14:NewValues name="ssa_userattribute_1"/>
     <ns14:NewValues name="ssa_userattribute_2"/>
     <ns14:NewValues name="ssa_userattribute_3"/>
     <ns14:NewValues name="ssa_userattribute_4"/>
     <ns14:NewValues name="ssa_userattribute_5"/>
     <ns14:NewValues name="ReportTimestamp">Thu Sep 06 09:53:10 PDT 2012</ns14:NewValues>
     <ns14:NewValues name="UrlParams"/>
     <ns14:NewValues name="AlertType">Risk-Fault</ns14:NewValues>
     <ns14:NewValues name="RetireTimestamp">Thu Sep 06 11:26:02 PDT 2012</ns14:NewValues>
     <ns14:NewValues name="ssa_is_rootcause">false</ns14:NewValues>
     <ns14:NewValues name="ssa_domain_id">4503599627370496</ns14:NewValues>
     <ns14:NewValues name="ssa_queue_id">2</ns14:NewValues>
     <ns14:NewValues name="ssa_queue_id">3</ns14:NewValues>
     <ns14:NewValues name="ssa_queue_id">5</ns14:NewValues>
   </ns14:AlertCleared>
 </env:Body>
</env:Envelope>