In this chapter
Windows Management Instrumentation (WMI) is the recommended mechanism for managing your Windows-based operating systems. Microsoft has provided a comprehensive infrastructure that enables you to instrument your servers and applications. It is all built on the WMI SDK, and the .NET framework comes with base class wrappers to make it easy.
WMI gives you a consistent, extensible, and discoverable schema with which you can instrument your servers and applications. You can gain uniform access to dispersed data sources regardless of their location. And WMI is based on industry standards, so this makes it easier to understand and maintain.
Monitoring is useful because it will let you know whether your applications and servers are performing correctly. Most of the time, monitoring is done by system administrators who are part of your company. But they rarely have a lot of knowledge about your applications. And for this reason, it is wise to create a way for the development team responsible for an application to monitor an application's health and performance. This provides a better way to discover and diagnose problems that an application might experience on an ongoing basis.
The application monitoring questions you need to ask fall into two large categories. First, is the application working the way it should work ”is it healthy ? Second, is the application performing well? You might want to note usage trends and optimize those applications where you will get the most results from your efforts.
Let's get some acronyms out of the way. These are important to recognize not only while you read this chapter, but in other resources, as well. We have already talked about what WMI stands for, but there are more acronyms than that. See Table 19.1 for a list of WMI Acronyms.
Table 19.1. WMI Acronyms
There are several components to the WMI technology. The first is the management infrastructure, which includes the CIM object manager and the CIM object manager repository. The repository is used to store the schema definitions for the management objects.
WMI consumers monitor WMI events through CIM. CIM enables you to perform actions based on this information. WMI providers act as intermediaries between CIM and the underlying objects. The providers actually get the information from the operating system and satisfy queries from WMI consumers.