locked
How do you make a Custom WMI object trigger an alert in SCOM 2007 RRS feed

  • Question

  • I've written and installed (via InstalUtil) a console app with the following code.

     

    public class PageServed : BaseEvent

    {

         public string Url;

         public TimeSpan ExecutionTime;

    }

     

    public class Activity : Instance

    {

         public double Level = 0;

         public readonly int Number;

     

         public Activity(int number)

         {

              Number = number;

         }

        

         public void Advance()

         {

              if (Level > 1000.00)

                   Level = 0;

              Level++;

         }

    }

     

    [RunInstaller(true)]

    class Program

    {

         static void Main(string[] args)

         {

              const int NumActivities = 10;

              List<Activity> activities = new List<Activity>();

     

              for (int n = 0; n < NumActivities; n++)

              {

                   Activity activity = new Activity(n + 1);

                   activity.Published = true;

                   activities.Add(activity);

              }

     

              PageServed served = new PageServed();

              served.Url = "http://dropbox.ecollege.com/NewDropBox.ed";

              served.ExecutionTime = new TimeSpan(40000);

     

              while (true)

              {

                   Console.Write("\r{0} \r", DateTime.Now);

                   served.Fire();

     

                   for (int n = 0; n < NumActivities; n++)

                        activities [ n ].Advance();

             

                   Thread.Sleep(2000);

              }

         }

    }

     

    When I run this code, I can view the events and instances in Microsoft Visual Studio's Server Explorer, wbemtest, and CIM Studio.

     

    I would like to make System Center Operations Manager (SCOM) 2007 record an alert every time that Activity's Level attribute goes over 10.  How do I do this?

     

    I've created a monitor that specifies that even 10 is the threshold but I never see any alert generated.  I'm sure that Activity's Level goes above 10 but I can't figure out how to generate an alert.

     

    Thanks for your help!


    Tim

     

    Tuesday, July 1, 2008 9:08 PM

Answers

  • Hi,

     

    This forum is for System Center Essentials(SCE) related issues. For questions about System Center Operations Manager(SCOM), please use the following Microsoft public newsgroups, which would be the best resource for your question.


    Operations Manager Newsgroups
    http://technet.microsoft.com/en-us/opsmgr/bb839593.aspx

     

    Thanks.

    Thursday, July 3, 2008 3:07 AM

All replies

  • I've found one part of my question.  If I make a WMI Performance Counter Monitor (in the Authoring area), set the Target as a Windows Computer, enter my WMI namespace (e.g. root\foo) and my query (e.g. SELECT * FROM Activity), set my Object to Activity, Counter to Level, Instance to Default, and Value to $Data/Property[@Name='Level']$, set my Threshold to 10, and then configure the Monitor to generate an alert, I can be alerted when the WMI value goes over 10.

     

    I'm still trying to figure out how to make a WMI event trigger an alert in SCOM.

     

    Thanks!

    Wednesday, July 2, 2008 1:39 PM
  • Hi,

     

    This forum is for System Center Essentials(SCE) related issues. For questions about System Center Operations Manager(SCOM), please use the following Microsoft public newsgroups, which would be the best resource for your question.


    Operations Manager Newsgroups
    http://technet.microsoft.com/en-us/opsmgr/bb839593.aspx

     

    Thanks.

    Thursday, July 3, 2008 3:07 AM
  • please check http://scom.codeplex.com for some samples that may be useful to you....
    vkd...the vons
    Wednesday, October 28, 2009 4:45 AM