Kaseya Community

Method for WMI Counter Monitoring

  • EventTracker_Source.zip
    Well, as others have asked, I was looking for a way to monitor WMI metrics. Kaseya Support notified me recently that this sort of thing is on slate to be put in, but sounds like it may not be until 5.0... I'm guessing that's a ways off :-?

    So I've started working out my own solution and thought I'd post my progress. Very simply, I use a script language called "AutoIt"(kentschu raised in the Event Logs - Monitoring vs Alerting ( http://www.kaseya.com/kforum/view_topic.php?id=2039&forum_id=42 ) topic.

    You can use the INI file to define the type of event(s) you are looking at, and a set of criteria on when to be notified. For example: when event Id "911" occurs 3 times within 5 minutes, create a new error event (say, 922) in the log that Kaseya will pick up. To effectively use this, you would want to have Kaseya ignore the 911 event, but not the 922.

    Hopefully I'm making sense Wink In the attached zip file you will find the source and compiled script. I also included a script that will generate some fake event errors so that you can see how the program would work. The "EventTracker" sits and runs continuously, if you need to quit it hit "Ctrl+Q".


    Here's what's next, what's wrong, and what I plan to develop further for my own purposes (I'll still post here):
    1. Add more error-checking. Right now if you put the wrong stuff in the INI script, the app will crash. Let me know if you find other bugs!
    2. Make it run as a service. I'm guessing this might be needed, I know how to do it, just unsure on how to deploy it easily...
    3. Most Important: Create Scripts/modify Script to monitor other WMI metrics.
    4. Find way to actually monitor WMI with a resulting history, rather than just alerting.
    I'm sure there's much to discuss, let me know what you think... thanks for reading!



    Edit: Below is the source and here are instructions for compiling, or you can just run the binaries in my second post!
    1. download AutoIt (
    2. http://www.autoitscript.com/autoit3/downloads.php )
    3. Open the scripts in SciTE (it'll be in the program group)
    4. Hit F7 to compile, exe's will be generated.
    5. Run the programs!


    Legacy Forum Name: Method for WMI Counter Monitoring,
    Legacy Posted By Username: fisofo
  • EventTracker_Binaries.zip
    So here's the binaries for those that don't need all the extra work (which should be everyone... that's why we have kaseya, right?)


    Legacy Forum Name: Monitor/Event Sets/SNMP Sets,
    Legacy Posted By Username: fisofo