UNKNOWN - The WMI query had problems

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
preethu.d
Posts: 109
Joined: Wed Nov 25, 2020 11:32 pm

UNKNOWN - The WMI query had problems

Post by preethu.d »

Hi Team,

I am getting the below error for CPU usage monitor for some windows servers which are added in Nagios via WMI. I am seeing this error only for CPU usage monitor. Other services like memory, disk all are working as expected. I checked the WMI user and it has admin privilege. What is the reason for this issue and how this can be fixed ?

UNKNOWN - The WMI query had problems. The plugin is having trouble finding the required WMI Classes on the target host (<IP address>). There can be multiple reasons for this (please go through them and check) including permissions problems (try using an admin login) or software that creates the class is not installed (eg if you are trying to checkiis but IIS is not installed). It can also happen if your version of Windows does not support this check (this might be because the WMI fields are named differently in different Windows versions or your version of Windows does not even have the required WMI class). Sometimes, some systems 'lose' WMI Classes and you might need to rebuild your WMI repository. Sometimes the WMI service is not running, other times a reboot can fix it. Other causes include mistyping the WMI namesspace/class/fieldnames. There may be other causes as well. You can use wmic from the command line to troubleshoot. Wmic error text on the next line.

Regards,
Preethu
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: UNKNOWN - The WMI query had problems

Post by ssax »

Please run through this KB article to troubleshoot:

https://support.nagios.com/kb/article/n ... g-579.html

Please PM the full output of this command:
- Change X.X.X.X to the IP of the remote Windows system and credentials

/usr/local/nagios/libexec/check_wmi_plus.pl -H X.X.X.X -u 'DOMAIN\username' -p 'password' -m checkcpu -w '80' -c '90' -d

Did you follow this guide?

https://assets.nagios.com/downloads/nag ... ios-XI.pdf

Do you see any errors in the event log on the remote system?
preethu.d
Posts: 109
Joined: Wed Nov 25, 2020 11:32 pm

Re: UNKNOWN - The WMI query had problems

Post by preethu.d »

Hi,

I have sent you the output via PM.
It was working earlier and recently I have noticed this error for CPU monitor.
I'll check the event log and update you.

Regards,
Preethu
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: UNKNOWN - The WMI query had problems

Post by ssax »

I would run through this and verify everything is correct:

https://assets.nagios.com/downloads/nag ... ios-XI.pdf

Are all the WMI checks against that host failing or just the CPU one?

Please rebuild the counters if you haven't, see if that fixes it:

https://docs.microsoft.com/en-us/troubl ... e-counters

You can try rebooting the remote system or rebuilding the WMI repository as a last resort:

https://community.spiceworks.com/how_to ... repository
Locked