Christopher_Mal
ServiceNow Employee
ServiceNow Employee

Many our our customers upgrading to SCOM 2012 may have encountered some issues using the ServiceNow 2007 R2 plugin. I have been told by SCOM experts and consultants that we should stop using the connectors our plugin installs with. Correction on the previous statement here - Chris Nanda commented that MS fully supports their connector framework. Following is the link he provided as proof. I stand corrected. http://social.technet.microsoft.com/wiki/contents/articles/12804.system-center-2012-integration-guide-operations-manager.aspx#Connectors

Please use this approach to make outbound web service calls from Microsoft Orchestator.

I could scarcely find examples out there that showed how to do this, so here is at least one to get you going.

Before I can begin I have to give credit to Jason Petty from ServiceNow who worked on this with me and to Howard Humphrey from OneOK, who was more than generous and helpful in sharing his knowledge with ServiceNow. Thank you guys once again.

I will not go into creating and setting up SCOM. I assume you are already at that point in this blog.

PREREQUISTES:

1. You will need a SCOM server
2. You will need to install System Center 2012 Orchestrator with Runbook Designer and tools.
3. You will need to install the Operations Manager 2007 R2 Pack (found here: http://technet.microsoft.com/en-us/library/hh531770.aspx)

The Runbook Designer looks like the image below. After you install the Operations Manager 2007 R2 Pack you will have a list of activities for monitoring your SCOM alerts. We will be using some of those activities in this workflow along with the utilities provided out of the box for consuming web services.





Step 1: Create a New Runbook and drag and drop the Monitor Alert activity found in the Operations Manager 2007 R2 folder. When you double click the activity you will see a Monitor Alert Properties dialog come up. Select the SCOM server available. Select your trigger types. Create a filter. In this case any alert that contains Low Disk Space will cause this Run Book to advance to the next activity.





Step 2: Similar to ServiceNow workflow you can drop another activity into the workspace. This time we will select the Invoke Web Services activity from the Utilities folder. Connect the monitor alert to the newly created Invoke Web Services activity. In the General tab you can name this activity to whatever you want. I named mine Insert Incident. Below are the properties to set up this web service. In the details tab a WSDL is expected. You may have to include the basic authentication on the security tab if your WSDL download is protected with basic auth. Select the method you wish to use. The XML Request Payload is auto generated. I replaced the "?" with blanks. In this example I hard coded the short description, but users of MS-Runbook know they can use dynamic variables here and previous subscribed variables (in this case from the monitor alert activity).

I found this site to be the most helpful when understanding MS-Runbook and web services. http://www.systemcentercentral.com/opalis-interacting-with-web-services-part-1ndash-making-calls-and-extracting-data/.









Step 3: Once we get a response back from our incident create we need to get the incident number from the response payload. The link posted above is a great resource to show how to do this as well. There is an activity under the Utilities folder again to query XML. You can use XPATH to parse the XML looking for the response tag you expect. You can also right click in the XML Text field of the Details and select the Published Data option to get the variable associated with the response payload XML from your web service request. See image below.





Step 4: Lastly we need to update the alert that started this all. Select the connection your SCOM server runs on and select the Alert ID from the variables available (by right clicking in this field and using the slush bucket). The field we want to update on the alert is the TicketId field with the value we parsed from our previous step. You can dereference this value by right clicking and selecting it from the choice list.





Step 5: Sit back and enjoy a nice cold beverage of your choice.

This is the basic setup for creating incidents using web services out of Operations Manager. If anyone has any more information they would like to share with the community then as always I hope and encourage you to do so. Hope this helps some. If there are any issues with this - please contact my colleague Jason Petty 🙂 JK Jason. Please let me know. Cheers.

6 Comments