Knowledge Base

Paessler's Guide to Troubleshooting WMI Problems

Cette page n’existe pas en français en ce moment. Nous vous prions de nous excuser.

Every so often customers using our monitoring tools (e.g. PRTG Network Monitor) report issues when trying to monitor their systems using WMI (Windows Management Instrumentation) sensors. In most cases, these issues stem from a malfunctioning WMI configurations/installations. For example, we have noticed that many times when WMI issues arise one (or multiple) WMI components crucial for proper WMI monitoring are missing or have not been implemented properly.

Testing the WMI Connection using our WMI Tester

In order to troubleshoot such issues, please test the connection using our WMI Tester, available under http://www.paessler.com/tools/wmitester.

In order to test the connectivity and availability of the desired WMI counters, either for local or remote testing, start the WMI Tester and provide the following configuration data:

  • Target computer name / IP address
  • Domain: the Windows domain containing the computer you want to test
  • User: the name of a user with login credentials for the target machine
  • Password: the user’s password


Note: if you are testing the local machine, leave the above fields empty

Further configuration entries available (under “Advanced Usage” are):

  • Domain prefix: this can usually be left as NTLMDOMAIN:
  • Query: choose between four predefined query sets (process, disk space, memory, processor load) or enter your own query (in WQL)


Note: by default, the WMI namespace used is CIMV2. Currently, this can not be changed!

After defining these settings click the „Test!“ button. After a while, you will either see a result table or, in the event something went wrong or the WMI service is not available, an error message.

What the WMI Tester does

The WMI Tester will forward the defined query using the provided credentials to scan against the counter in case. Generally, and if the provided credentials allow to connect to the target machine in case, the WMI tester will receive a response from the WMI service, most often in the form of a table. If an error does occur, the WMI Tester utility will provide the error code or a text alarm referring to the issue in case (for example, if it was unable to connect to the defined target machine / domain). If a result set is returned, the WMI service and the credentials provided for the target machine are working properly, and as such, the same query should be possible from within PRTG 7.

Further Troubleshooting using Microsoft’s WMI Diagnosis Tool

If the Tester returns an error code, please check the service status using the following WMI Diagnosis Utility:

http://www.microsoft.com/downloads/details.aspx?FamilyID=d7ba3cd6-18d1-4d05-b11e-4c64192ae97d&DisplayLang=en

Information about the WMI Diagnostics Tool provided by Microsoft:

Quote: ‘WMIDiag.vbs is a VBScript script designed to help you ascertain the current state of the WMI service on a computer. The download package includes the utility itself, a ReadMe file that discusses how the tool works (and how to best use it), and sample spreadsheets that provide information about the default WMI configuration on various versions of the Microsoft Windows operating system.’

After running the WMI Diagnosis Tool, three files are created:

  • a .LOG file containing all WMI Diagnosis Tool activity (and a WMI report)
  • a .TXT file containing the same WMI report as mentioned above
  • a .CSV file containing various statistics valuable for measuring trends and issues


After the WMI Diagnosis Tool terminates, an ERRORLEVEL variable will be set to one of the following:

  • 0 = SUCCESS
  • 1 = ERROR
  • 2 = WARNING
  • 3 = Command Line Parameter errors
  • 4 = User Declined (Clicked the Cancel button)


If the WMI Diagnostics Tool does not offer a solution to the issue in case, check the error codes provided by our WMI Tester and the WMI Diagnosis Tool. For further troubleshooting information as regards these particular error codes, please consult the following Microsoft TechNet article (aptly entitled "WMI Isn't Working!"), listing multiple WMI configuration issues, providing the methodology necessary to repair such configurations:

http://www.microsoft.com/technet/scriptcenter/topics/help/wmi.mspx

For quick reference, the error codes and issues outlined in this article are:

  • 0x8004100E (“Invalid Namespace”)
  • 0x80041010 (“Invalid Class”)
  • 0x800A01B6 ("Property or method not supported")
  • 0x80041013 (“Provider not found”) or 0x80041014 (“Component failed to initialize")
  • Script doesn't return any data
  • Cannot connect to a remote computer
  • Script not working even though namespace, class and property are correct
  • WMI service is running, all the .DLLs have been re-registered, script still not working
  • WMI repository rebuilt, script still not working


In most cases, if a corrupt WMI configuration is at fault for the issues at hand, the above process should allow to repair the configuration so that the WMI service in case is fully functional, allowing PRTG to access the relevant WMI counters on the target machine.

Please note most of these articles relate to actual WMI configuration issues, not necessarily errors that might be triggered due to software-specific issues. As such, if your PRTG sensors enter a "grey" state (status unknown), the articles above will most likely be of little use, seeing as this particular issue is not related to the actual WMI configuration. In the event of such issues, please try connecting with the WMI Tester to determine if you can connect at all (in which case the issue would not have to do with the actual WMI configuration) or if the situation stems from a software-specific issue. In the latter case (i.e. if the WMI Tester is able to connect but the PRTG software is not), please contact our support staff for individualized troubleshooting.

Further Reading

Another good article about all things WMI can be found under:

http://msdn.microsoft.com/en-us/library/aa394572.aspx

This article provides a list of WMI providers, information on the COM API for WMI, WMI queries, WMI log files, WMI security, WMI tools and WMI infrastructure objects and values.


Further articles of interest (providing more detail than the troubleshooting articles above), relating to particular aspects of WMI configuration can be found under :