Friday, December 21, 2012

SCSM: CMDB Items from other sources

systemcenter_2_2d9647a3I am currently focussed on building up our CMDB in Service Manager. While there are a number of connectors available for getting configuration item (CI) information into the SCSM CMDB, there are many other systems in our environment that do not have native connectors available but do contain CI information.

Most of these systems can do data dumps to CSV files, but I am not a big fan of the CSV import – especially as it is a fairly manual process and allows for errors to creep in. I much prefer an automated solution.

Luckily, if the system has a SQL database, it is possible with some magic provided by my BFF, Orchestrator Smile

For this example, I am working with the McAfee database, as it is one of our requirements to know whether or not the device is managed by McAfee.

Let’s get cooking

Ingredients:

Method:

1. Fire up the Authoring tool, and create a new management pack and a new class, selecting the other option and locate the Windows Computer component from the base class list.

image

You can now add additional property fields:

image

image

For this example, I called the additional field AVManaged.

2. Select the class in the Management Pack Explorer, and right click > Properties

image

Change the Extension field from False to True.

4. Seal the management pack and import into Service Manager

5. Map out the SQL query to pull the fields relevant to your environment (and matching the additional properties you created in step 2)

6. Create the runbook

image

You really only need 4 steps for this runbook:

  1. Query the database
  2. Split the fields (from the Data Manipulation IP)
  3. Get the CI to update from SCSM
  4. Update the CI

I always add a write to the event log step somewhere for troubleshooting purposes (which we collect with OpsMgr allowing for easy reporting too)

You can, of course, add a schedule activity to ensure running on a regular schedule, and add some additional error checking, as well as an activity to add the CI to the CMDB if it exists in your database but not in the SCSM CMDB.

Happy eating!

applause[3]

[image not my own]

No comments:

Related Posts with Thumbnails