Main Contents

Advanced WMI Exchange Monitor ZenPack for Zenoss Core

March 31, 2008

I had so much fun creating the WMI Performance Monitor ZenPack I decided to create one for Exchange. While there are many aspects of Exchange that can be monitored, I started with just a few for now. This one contains Intelligent Mail Filter (IMF) graphs and some critical metrics of the Exchange Information Store. The IMF monitor includes overall UCE percentage and a breakdown of the number of e-mails per SCL rating. The Exchange IS monitor includes active users, server and client RPC calls, and available virtual memory, and works for Exchange 2000, 2003 and 2007. Here are some screenshots:

Attached below is the WMI Exchange Monitor ZenPack. I’ve tested it with Zenoss Core 2.1.2 and 2.1.3.

WMIExchangeMonitor.zip

Install as you would any other ZenPack. If you like this or would be interested in collecting any more stats, let me know.

Filed under: Microsoft, Windows, Zenoss |

20 Comments

  1. Duarte April 7, 2008 @ 3:18 am

    Hello I’m trying to test this plug-in but the install give-me an error! Any idea?

    Output:
    zenpack –install /tmp/tmpj1YUN5
    INFO:zen.ZPLoader:Loading /home/zenoss/Products/WMIExchangeMonitor/objects/objects.xml
    WARNING:zen.AddToPack:Object /zport/dmd/Events/Win already exists skipping
    Traceback (most recent call last):
    File “/home/zenoss/Products/ZenUtils/zenpack.py”, line 287, in ?
    zp.run()
    File “/home/zenoss/Products/ZenUtils/zenpack.py”, line 55, in run
    self.install(packName)
    File “/home/zenoss/Products/ZenUtils/zenpack.py”, line 129, in install
    zp.install(self.app)
    File “/home/zenoss/Products/ZenModel/ZenPack.py”, line 109, in install
    loader.load(self, app)
    File “/home/zenoss/Products/ZenModel/ZenPackLoader.py”, line 95, in load
    importer.loadObjectFromXML(xmlfile=f)
    File “/home/zenoss/Products/ZenRelations/ImportRM.py”, line 239, in loadObjectFromXML
    parser.parse(self.infile)
    File “/usr/lib/python2.4/xml/sax/expatreader.py”, line 107, in parse
    xmlreader.IncrementalParser.parse(self, source)
    File “/usr/lib/python2.4/xml/sax/xmlreader.py”, line 123, in parse
    self.feed(buffer)
    File “/usr/lib/python2.4/xml/sax/expatreader.py”, line 211, in feed
    self._err_handler.fatalError(exc)
    File “/usr/lib/python2.4/xml/sax/handler.py”, line 38, in fatalError
    raise exception
    xml.sax._exceptions
    .
    SAXParseException
    :
    /home/zenoss/Products/WMIExchangeMonitor/objects/objects.xml:1708:2: mismatched tag
    Done installing ZenPack.

  2. James Dastrup April 7, 2008 @ 8:01 am

    It appears I had a typo in the objects.xml file which may have caused that error. Also, you may get some WARNING’s about event classes that already exist - those are OK. I’ve updated the link with the new ZenPack.

  3. Russ April 16, 2008 @ 8:36 am

    Again, excellent ZenPack!! Still had that same issue with some of the graphs, but really, to me, no big deal!!

    Thanks again,
    Russ

  4. James Dastrup April 16, 2008 @ 9:04 am

    The extra characters (FF) on each color have been removed, since it seems some systems can’t process the alpha layer. I originally was doing some transparent colors, but it wasn’t needed. The ZenPack link has been updated.

  5. Dennis April 17, 2008 @ 10:17 am

    I’m trying to use this and the install went fine, but the graphs are giving “MISSING RRD FILE”

    I looked on the file system and none of the RRD files were created. Not sure what to do.

    –Dennis

  6. Dennis April 17, 2008 @ 11:04 am

    Nevermind..I ran wmic by hand against the exchange server and it was failing so I did some more research

    Apparently the WMI db was messed up on the box. I had to rebuild it on the exchange server:

    wmiadap /c
    wmiadap /f
    Restart the WMI service

  7. steve April 18, 2008 @ 10:31 am

    This is GREAT! Exactly why I started fooling around with Zenoss was for monitoring like this. Thank you very much!

    Steve

  8. Jason June 16, 2008 @ 12:31 am

    I just started up a fresh copy of ZenOss Virtualmachine Appliance and I had to create a symbolic link to the wmic program.

    ln -s /home/zenoss/bin/wmic /bin/wmic

    I guess you could modify the scripts too…

  9. Jerris June 17, 2008 @ 9:41 am

    Anybody get this to work under 2.2.0?

    I’m getting the same “MISSING RRD FILE:” problem and did what Dennis suggested:
    ———————–
    wmiadap /c
    wmiadap /f
    Restart the WMI service
    ———————–
    But it didn’t work for me.

  10. Jerris June 18, 2008 @ 11:04 am

    Found the answer:
    http://community.zenoss.com/forums/viewtopic.php?t=5602&highlight=rrd+file

    ———————————————–
    FIX FOR 2.2 -

    - Edit $ZENHOME/Products/WMIPerformanceMonitor/libexec/wmi_exch_stats.pl
    and replace Line 12 with:

    $cmd = “/usr/local/zenoss/common/bin/wmic -U ‘@ARGV[3]‘%’@ARGV[4]‘ //@ARGV[2] “;

    ———————————————–

    Note that the VM version has a different location as well:

    ———————————————–
    - Edit $ZENHOME/Products/WMIPerformanceMonitor/libexec/wmi_exch_stats.pl
    and replace Line 12 with:

    $cmd = “/home/zenoss/bin/wmic -U ‘@ARGV[3]‘%’@ARGV[4]‘ //@ARGV[2] “;

  11. Luis Barreto August 15, 2008 @ 10:34 am

    Hello James

    Just to say that this is a 5 * zenpack.
    After making the change pointed by Jerris (using Core 2.2.3), everything is working.

    Could You kindly point some advice on creating something like this (most important counter) for SQL monitoring?

    Anyway, just to say Thank You for providing such an excellent and unique zenpack!

  12. christophe August 31, 2008 @ 3:01 am

    Hello,

    I’ve Error For Install this Zenpack (Zenoss Version 2.2.3) :

    zenpack –install /tmp/wmiexchangemonitor.zip
    INFO:zen.ZenPackCmd:Upgrading WMIExchangeMonitor
    INFO:zen.HookReportLoader:loading reports from:/usr/local/zenoss/zenoss/Products/WMIExchangeMonitor/reports
    Traceback (most recent call last):
    File “/usr/local/zenoss/zenoss/Products/ZenUtils/zenpack.py”, line 386, in ?
    zp.run()
    File “/usr/local/zenoss/zenoss/Products/ZenUtils/zenpack.py”, line 149, in run
    self.install(packName)
    File “/usr/local/zenoss/zenoss/Products/ZenUtils/zenpack.py”, line 226, in install
    zp.upgrade(self.app)
    File “/usr/local/zenoss/zenoss/Products/ZenModel/ZenPack.py”, line 201, in upgrade
    loader.upgrade(self, app)
    File “/usr/local/zenoss/zenoss/Products/ZenModel/ZenPackLoader.py”, line 292, in upgrade
    return self.load(pack, app)
    File “/usr/local/zenoss/zenoss/Products/ZenModel/ZenPackLoader.py”, line 287, in load
    registerSkin(app.zport.dmd, skinsDir)
    File “/usr/local/zenoss/zenoss/Products/ZenUtils/Skins.py”, line 43, in registerSkin
    addDirectoryViews(skinstool, ’skins’, base)
    File “/usr/local/zenoss/zenoss/Products/CMFCore/DirectoryView.py”, line 553, in addDirectoryViews
    raise ValueError(’Not a registered directory: %s’ % minimal_fp)
    ValueError: Not a registered directory: WMIExchangeMonitor/skins
    [zenoss@SVR-FRZENOSS ZenPacks]$ zenpack –install /tmp/wmiperformancemonitor.zip
    INFO:zen.ZenPackCmd:Upgrading WMIPerformanceMonitor
    INFO:zen.HookReportLoader:loading reports from:/usr/local/zenoss/zenoss/Products/WMIPerformanceMonitor/reports
    Traceback (most recent call last):
    File “/usr/local/zenoss/zenoss/Products/ZenUtils/zenpack.py”, line 386, in ?
    zp.run()
    File “/usr/local/zenoss/zenoss/Products/ZenUtils/zenpack.py”, line 149, in run
    self.install(packName)
    File “/usr/local/zenoss/zenoss/Products/ZenUtils/zenpack.py”, line 226, in install
    zp.upgrade(self.app)
    File “/usr/local/zenoss/zenoss/Products/ZenModel/ZenPack.py”, line 201, in upgrade
    loader.upgrade(self, app)
    File “/usr/local/zenoss/zenoss/Products/ZenModel/ZenPackLoader.py”, line 292, in upgrade
    return self.load(pack, app)
    File “/usr/local/zenoss/zenoss/Products/ZenModel/ZenPackLoader.py”, line 287, in load
    registerSkin(app.zport.dmd, skinsDir)
    File “/usr/local/zenoss/zenoss/Products/ZenUtils/Skins.py”, line 43, in registerSkin
    addDirectoryViews(skinstool, ’skins’, base)
    File “/usr/local/zenoss/zenoss/Products/CMFCore/DirectoryView.py”, line 553, in addDirectoryViews
    raise ValueError(’Not a registered directory: %s’ % minimal_fp)
    ValueError: Not a registered directory: WMIPerformanceMonitor/skins
    any Idea ?
    regards
    Christophe

  13. David September 23, 2008 @ 9:43 am

    I’m very interested in your work. We are decided on a monitoring solution, and Zenoss works the best. We’re working to integrate it with several different platforms, and the exchange hit the nail on the head.

    I’ve been trying to compile a new mib file for an exchange server, but cannot get the mib file compiled, and this might do the trick.

    David

  14. David September 24, 2008 @ 12:44 pm

    I think everything is set, and I’m getting the perf data, but no exchange perf data. I get cpu, memory, and terminal session details, but no exchange details…

  15. Ralf November 3, 2008 @ 9:52 am

    On 2.2.4 I still receive missing RRD file messages. I did the wmi trick, symbolic link trick and changing the path in the .pl file but it doesn’t seem to work. Anyone got a clue?

    Kind regards

  16. Fiss November 14, 2008 @ 9:01 am

    In 2.2.4, edit the perl script and add the ./ to the ligne 12 :

    $cmd = “/usr/local/zenoss/common/bin/./wmic -U ‘@ARGV[3]‘%’@ARGV[4]‘ //@ARGV[2] “;

    That works for both zenpacks.

    I’ll try with the 2.3

  17. Advanced WMI Performance Monitor ZenPack for Zenoss Core | Dastrup Tech Logs November 18, 2008 @ 2:14 pm

    [...] just a sample of what you can do with WMI. For example, you can also do SQL or Exchange monitoring (look here), IIS, 3rd-party products or even your own developed applications. If you like this ZenPack and if [...]

  18. Garyu Collis March 4, 2009 @ 5:21 am

    Hi,

    I have missing RRD graphs after installing zenpack and editing for correct wmic variable. I have your other zenpack (wmipermon) working fine.

    I get an Cmd: $ZENHOME/Products/WMIExchangeMonitor/libexec/wmi_exch_stats.pl IMF “machinename” “IP” “username” “password” - Code: 2 - Msg: Misuse of shell builtins in zenoss when modeilling a device and using the cmd line with the same command I get

    # ./wmi_exch_stats.pl IMF “machinename” “IP” “username” “password”
    Illegal division by zero at ./wmi_exch_stats.pl line 75.

    Any Ideas?

  19. Nils March 9, 2009 @ 1:41 pm

    I had the same problems.
    you can add
    in Line 74
    if ( $nTotalMessagesScannedforUCE == 0) {
    $nTotalMessagesScannedforUCE = 1;
    }

    right before
    $TotalPercentUCE = (sprintf(”%#.2f”,(($nTotalUCEMessagesActedUpon / $nTotalMessagesScannedforUCE) * 100)));

    but your imf seems disabled.
    check in admin.. groups->company->server->proto->smtp

    properties advanced on ip settings and enable imf

  20. Gary March 19, 2009 @ 5:39 am

    Hi,

    I have this working but a few graphs on some machines do not populate.

    When I run a test through the GUI using something like;

    $$ZENHOME/Products/WMIPerformanceMonitor/libexec/wmi_stats.pl TS “${dev/id}” “${dev/manageIp}” “${dev/zWinUser}” “${dev/zWinPassword}”

    I receive the following;

    Executing command against machinename
    Unknown|No Response
    DONE in 0 seconds

    I also receive the same “Unknown|No Response” error through the CLI.

    Can any one help?