Service Startup Monitoring

Situation:  We want to monitor a service’s startup type and make sure that it is not set to automatic – disabled or manual is ok.  If the service is set to automatic we want to set it to manual

Step 1:  Create a new management pack. 

Because we do not have a management pack related to this program yet I need to create another one.  I will use the Authoring console.

imageimage

Step 2:  Create a class for this program. 

I am creating a class so that I can create a dynamic list of the servers that have this program installed and find out some information about this program.  The workflows that I create then will be targeted at this class.

image

image

image
image

image

image

Connect to a computer that has the program installed

image

image

image

image

image

image

Step 3:  Create the discovery

image

 

image

image

Discovery Targets are the computers that will have the discovery run on them.  For example, if you choose windows server operating system the discovery will run on all windows servers (and then return us a subset that do indeed have the program we want to monitor installed on them)

image

image

image

image

image

image

image 

 

image

 

image image image image image image image image image image

Step 4:  Create a new monitor Type

I am going to use a PowerShell script to detect if the startup of the service is set to automatic or not so I need to create a new monitor type.  This monitor type will include a datasource System.Scheduler, a probe Microsoft.Windows.PowerShellPropertyBagProbe , and two expression filters (one for each state).

image  image     image image image image image image image image image image image  image image image image image

image image image

Step 5:  Create the monitor

Now that we have the class and discovery created we can target workflow at the new class.  Since the monitor I am going to create is a configuration type monitor (is a service configured to have startup type of Not Automatic) I will put it under the Configuration State rollup.

image image image  image image  imageimage image image image image image image image image

This entry was posted in Management Pack Authoring and tagged . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s