Tuesday, March 9, 2010

WMI Resources

Why I use WMI
The company I work for has strict application performance SLAs. I am responsible for "near real-time" performance monitoring of the systems that my company uses to process business. The recession hasn't been kind to us and our budget is tight so often I find myself using alternatives to traditional Enterprise products for monitoring our environments. With that in mind, WMI is an extremely powerful tool for monitoring Microsoft Windows environments.  WMI provides a simple interface to Windows Performance Monitor objects (aka: Perfmon).


Limitations
To be fair, I must confess that WMI has some limitations.  We mitigate the maximum query per second limits by spreading the requests across many servers in our management and monitoring infrastructure.  These servers need not be powerful, but you will need more than one OS.  This is a good case for virtualization of WMI query servers.  We take advantage of our VMware vSphere infrastructure to accomplish this.   


How we use WMI
One of the tools we use in our environment is Paessler PRTG Network Monitor. PRTG is heavily dependent on WMI for it's out of the box monitoring. We also use it's custom capabilities including PowerShell and VBScripting but until they can support multiple channels from one script, it's fairly limited.  In the future I'll expand on scripting and the how much control you can gain through WMI.

For now, I've collected some of my favorite resources for WMI and I intend to maintain them on this page for my own reference and hopefully for your benefit as well.

Microsoft References:
FAQ - Brief synopsis of WMI & useful scripts
Classes - Classes defined by WMI
Providers - Preinstalled providers for WMI managed objects
COM API- COM interfaces to WMI
Scripting API - Components of the Scripting API for WMI
WQL - WMI query language

Log Files - WMI & providers logging & troubleshooting
Security- Security objects and methods to manipulate security or privileges.
Command-Line Tools -Syntax used by mofcomp, winmgmt, wmic, smi2smir, and wmiadap.
Infrastructure Objects and Values - WMI return types
Basic WMI Testing - Windows Performance Team discussion on troubleshooting WMI



Paessler References
WMI Code Error 80041010 - Invalid Class'
Article: Don't Use Windows Vista And Windows 2008 for Network Monitoring via WMI!
WMI sometimes gives object not found errors because the WMI schema on the Windows OS being monitored is out of date. If you encounter this condition you must run: wmiadap /f on the device in question. Paessler has an extensive help resource for WMI issues.
http://www.paessler.com/support/kb/prtg7/wmi_not_working


Tools & Downloads:

Free WMI Tools from Microsoft:
Other free WMI tools:

No comments:

Post a Comment