Orchestrator

Orchestrator – Getting Data from SCSM via SCORCH to SNMP to SCSM

In this post I would like to show how to interact with Service Manager objects to get information from SNMP devices and put data back into Service Manager. A customer needed a solution to get serial numbers from different network devices into his Service Manager form to have the most valuable data available for those devices.

If you already using network monitoring in SCOM 2012 then you know that you get all kinds of data on the network object. Here an example of the properties of a switch in SCOM…

image

What SCOM not does, is discover other properties which might be useful e.g. the serial number of the device. The serial number is just another system object ID (OID) on the networking device which can differ between each vendor or even between model types from the same vendor. That means for a HP switch Pro Curve type A you will have a different OID for the serial number than for a HP switch Pro Curve type B.

Now how do I get the serial number into a Service Manager form?

First I have been discovering and monitoring all the network devices in SCOM 2012. As a next step I setup a connector from Service Manager to SCOM 2012 to import all these devices into a Service Manager. The Service Manager form is based on an extended Node class which has field Serial Number that is missing. It looks like this…

image

Let’s resume what we have. We have partial data of the network device in SCOM 2012 and the same data in Service Manager 2012. Now we need somehow to connect to the network devices, read the correct value and update the data in Service Manager. In my opinion a great task for Orchestrator 2012.

Step 1

Log into a switch which is monitored by SCOM and find out what serial number this switch type has.

Step 2

Because we don’t know which OID contains the serial number we need to dump all OID’s from the network device into a text file. The best way to do this is to use SNMPWalk.exe . You need to run the following command for your switch from step 1…

snmpwalk –r:[IP of the network device] –c:[read community string] > c:\temp\Switch.txt

image

Step 3

Open the Switch.txt file in Notepad and search for the serial number from step 1. Use the find command to find your serial number in this file…

image

Notice here the OID=.1.3.6.1.2.1.47.1.1.1.1.11.1 is the number we are looking for.

Step 4

If you look closely at the Service Manager form you will see that the exact type of the switch is in the description field.

image

Step 5

Now starts the fun part. We are going to create a runbook which will get all the other serial numbers from the switches of the same type.

The runbook looks like this…

image

Note: I have used the Send Platform Event activity just for debugging purposes and I will not describe it. You might want to use it also in the beginning.

1. Get SCSM Network Object will get the object from Service Manager

image

2. Map Type to OID Data is used to get the Description field from the Service Manager object and the match a pattern ProCurve J4906A* to the OID 1.3.6.1.2.1.47.1.1.1.1.11.1 . Create an Output called OID which will contain the “serial number” OID for the different switch models. In our sample we have two different ProCurve switches.

image

3. From the Get SCSM Network Object activity you have the SNMP Agent Address which corresponds to the IP address of the switch. Provide this IP to the Get SNMP Variable activity as published data for the IP address. As Object identifier you use the OID published data from the previous activity.

image

4. On the Update SCSM Object activity use the SC Object GUID published data from the first Get SCSM Network Object activity  to update the current object. Map the Serial Number field to the MIB value from the Get SNMP Variable activity.

image

5. Finally, if you start the runbook the value will be inserted…

image

Now you could schedule this runbook to run on a regular schedule. The downside of this approach is, that you need to figure out at least one time the OID for each network device and put it into the Map Type to OID Data activity.

But I think if you have lots of devices from the same type it will be a good way to keep your CMDB up to date with the serial number.

3 Replies to “Orchestrator – Getting Data from SCSM via SCORCH to SNMP to SCSM

  1. Hi,
    i have the problem to bring the Lefthand Storage into a View. There are thousand of classes and all i found are internal. Have you created a view and which class did you take?

    Mike

Leave a Reply to Mike Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.