Process monitoring during business hours – attempt #1


It has been a long time since my last post, this summer has been long and busy and writing (poorly) in English takes so much time. Anyway I have several notes that need to be shared, I hope to be able to turn them into articles quickly in the next few weeks. First of all I want to start from a promise I made in this blog, in Italy we say every promise is a debt, and so here we are.

Sure enough process monitoring is a task that well adapts to the business hours cycle, alas the standard template provided by the Microsoft.SystemCenter.Process.Library management pack doesn’t allow to specify business hours. So I took my time to check how to create my own MP to have a business hours filter for process monitoring. My final goal is to recode the standard wizard to add a scheduler filter page and then have all the monitors to take into account this filter. This proved to be challenging since there’s no documentation on creating templates and there’s no documentation on built in forms (UIPage) that you can use in your wizard (UIPageSet). So getting to the final goal is going to take a lot of time in reverse engineering, I still want to get there, but as an intermediate step, I’ll show how to modify the template to add a scheduler filter for the business hours constrain. In this first step the wizard won’t ask for the business hours filter, instead, once the MP is created, you’ll need to use overrides to set the required business hours, by default the monitors will always run.

Before getting into the real stuff a quick background. The standard Process Library template can create the following monitors (I will skip the rules for this post):

  • ProcessInstanceCountMonitor
  • UnwantedProcessMonitor
  • ProcessMemoryUsageMonitor
  • ProcessCPUUsageMonitor
  • ProcessRunningTimeMonitor

Based on your choices in the wizard one or more of these monitors will be enabled, anyway all of them will be created in your wizard derived management pack. It seems the template schema has no conditionals to skip unwanted code snippets.

All of these monitors are scheduler based, so they’re executed every x seconds, what we need to add is a System.SchedulerFilter as we did in previous posts on business hours monitoring. To make things manageable I chose to have an inclusive filter (OnSchedule) filtered by days of week and days hours, to be clear, in this way, we can build a monitor that runs from Monday to Friday from 08:00 AM to 08:00 PM.

The steps required are:

  1. copy the Microsoft.SystemCenter.Process.Library and unseal it, we need the XML format
  2. modify the monitor types to add a SchedulerFilter
  3. modify the template so that it generates the monitors with the proper parameters (i.e. the ones needed for the SchedulerFilter)
  4. IF we want to have our own template we must rename the whole stuff, keeping the references, when needed, to the Microsoft.SystemCenter.Process.Library / OR / we must remove the Microsoft.SystemCenter.Process.Library MP and import our own

Beware, until the MP is sealed all the new monitors will be created in place. So it’s a good idea to seal it.

Let’s take a closer look at the steps.

First we need to add the needed parameters to the configuration tag of the monitors, in our case the bitmap for the week days (days) and the time range (from, to)

image

Then we need to add a module to the member modules section

image

Finally, as usual, we just need to add the filter to the regular detections.

image

The entire process is mainly a copy and paste one and very similar to what we’ve seen in other business hours related posts, but then there’s the template part, where we need to integrate the new parameters (days, from, to) in the template for the actual monitor

image

But we’re not finished yet, we must rename the template and set all the references to the original Microsoft.SystemCenter.Process.Library MP, then every template must have its own folder

image

As you can see, there’s a lot of work to be done even for this first simple attempt, to make things easier you can download a mock MP here. Since it’s not sealed all your monitors will be crated in place.

Once the MP is ready and imported you can create a new process monitor using the new template, then you must add an override to set up the proper business hours filter. Here’s the step by step guide after the wizard is complete:

image

 

image

 

image

image

image

– Daniele

This posting is provided "AS IS" with no warranties, and confers no rights.

About these ads
  1. #1 by dorlm on October 28, 2012 - 10:39 am

    I can’t download the mock MP
    where can i find it?

  2. #5 by Bryan on November 23, 2010 - 11:17 pm

    Did you ever get your second attempt going? Maybe I am not an XML guru but I am falling short on getting this working.

    • #6 by Daniele Grandini on November 25, 2010 - 12:56 pm

      Still working on it, my spare time is at a bare minimum. Be patient. :-)

  3. #7 by Michael on November 11, 2010 - 3:11 pm

    Hi Daniele
    Awesome guide and works perfectly.
    I would like to have this for a specific service. Do i “just” need to add the UnitMonitorType in the xml for that?
    Thumps up!
    Michael

    • #8 by Daniele Grandini on November 12, 2010 - 5:22 pm

      Hi Michael,
      the process should be more or less the same, currently I’m working on attemp #2 in my spare time, I want to be able to add a GUI page for the business hours filter… stay tuned

      • #9 by Michael on November 15, 2010 - 8:13 am

        Awesome, looking forward to that :).

  4. #10 by Jonathan Almquist on September 18, 2010 - 5:45 pm

    Hi Daniele,

    This is great information. I’ve created libraries and templates for some customers in the past, including monitor types with scheduler filter like this. But I have offered this as a template for customers to reference while authoring MP’s in the Authoring Console. Porting these into the OM Process Monitoring library as you demonstrate here is a great way to offer customers to use these templates in the Operations Console. This is something I’ll do going forward.

    Quality post, as always!

    -Jonathan

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

Follow

Get every new post delivered to your Inbox.

Join 266 other followers

%d bloggers like this: