Wednesday, August 15, 2012

Zenoss - WMI Counters for Disks

I mentioned previously that I was having an issue with my step-child monitoring system, Zenoss, where the WMI disk counters were not behaving correctly.  The disks would be found when the system was modeled (or re-modeled) but they would always show up "bad counter for..", instead of you know, working.  My original train of thought was related to the zWinUser and zWinPassword properties that were used to collect WMI stats from all of our Windows boxen.  However, I wasn't entirely convinced because we use the same user/password for all of the Windows systems in that domain, and none of the others was exhibiting this behavior.  After some more research and a little bit of actively NOT thinking about the problem, I realized that the all of the other WMI events/stats were being pulled just not disks.  It turns out you can disable perf counters for disks via the registry in W2k3 server, via this key:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Perfdisk\Performance\Disable Performance Counters

On my server that was acting up, this was set to 1.  I changed the value to 0,  and remodeled the device (its Zenoss, I do it everytime I change something) and all my events cleared themselves.

Saturday, August 11, 2012

Pulling zWinUser and zWinPassword out of Zenoss ZopeDB

In my continuing saga of having to maintain a sparsely documented Zenoss instance.  I was trying to troubleshoot some WMI errors (that will be a later post), but I had no idea what the password was for the user we are using to pull this information from our various Windows servers.  And yes, I could have reset the password, but that may open a whole other can of worms that I didn't want to deal with.  So, using zendmd, which I mentioned previously, I used the following to pull zWinUser and zWinPassword:

$ zendmd
Welcome to the Zenoss dmd command shell!
'dmd' is bound to the DataRoot. 'zhelp()' to get a list of commands.
Use TAB-TAB to see a list of zendmd related commands.
Tab completion also works for objects -- hit tab after an object name and '.'
 (eg dmd. + tab-key).
>>> d = dmd.Devices.findDevice('')
>>> d.zWinUser,d.zWinPassword
('DOMAIN\\user', 'password')

Good luck and godspeed...

Friday, August 3, 2012

Zenoss ZopeDB Access

So, I'm sort of tangentially in charge of our Zenoss monitoring system, and on and off over the past couple of years I've derided the fact that Zenoss decided to store the important information about objects in a Zope database, and I couldn't figure out how to query it without writing Python to interact with it programatically.  Today, I guess I stumbled across the right set of search terms for Google to spit out something genuinely useful: zendmd.  I'm not going to get in to how to use it, as there is some at least decent information out there, and once you get in, its very Python interpreter-y, it should be easy to get your bearings.