Except CPU, Uptime other services working fine

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
lgaddam
Posts: 116
Joined: Wed Aug 28, 2019 1:01 am

Except CPU, Uptime other services working fine

Post by lgaddam »

Team,

We are facing issues on few of windows 2008 servers related to OS Performance monitoring via WMI.
Nagios able to collect data for Memory and Disk Monitoring but not able to collect for CPU & Uptime.

KInldy check the issue and help. Attached error and logs with "-d" for WMI.

Below is the output from Nagios server command line testing with "-d" option.

[root@p01 ~]# /usr/local/nagios/libexec/check_wmi_plus.pl -H 192.168.72.138 -u 'xxxxxxl' -p 'xxxxxx' -m checkcpu -d
Command Line (v1.6): /usr/local/nagios/libexec/check_wmi_plus.pl -H 192.168.72.138 -u USER -p PASS -m checkcpu -d
Base Dir: /usr/local/nagios/libexec
Conf File Dir: /usr/local/nagios/libexec
Loaded Conf File /usr/local/nagios/libexec/check_wmi_plus.conf
Extra Wmic Arguments specified:--option=client ntlmv2 auth=Yes
Starting Keep State Mode
STATE FILE: /tmp/cwpss_checkcpu__19216872138___.state
Round #1 of 1
QUERY: /usr/bin/wmic '--option=client ntlmv2 auth=Yes' '-U' 'USER%PASS' '--namespace' 'root/cimv2' '//192.168.72.138' 'select PercentProcessorTime,Timestamp_Sys100NS from Win32_PerfRawData_PerfOS_Processor where Name="_Total"'
UNKNOWN - Plugin Timed out (15 sec). There are multiple possible reasons for this, some of them include - The host 192.168.72.138 might just be really busy, it might not even be running Windows.
[root@p01 ~]#


Below is the output from Nagios web console which we tried to test CPU.


[nagios@p01 ~]$ /usr/local/nagios/libexec/check_wmi_plus.pl -H 192.168.72.138 -u 'xxxx' -p 'xxxxxxx' -m checkcpu -w '90' -c '95' -t 120
UNKNOWN - The WMI query had problems. The error text from wmic is: [wmi/wmic.c:212:main()] ERROR: Retrieve result data.
NTSTATUS: NT code 0xc002001b - NT code 0xc002001b
You do not have the required permissions to view the files attached to this post.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Except CPU, Uptime other services working fine

Post by ssax »

Could you be hitting this?

https://support.microsoft.com/en-us/hel ... entation-s

Is the user a local admin on that system? If they aren't, please add them into the administrators account on that system and then test to see if it works if you do that.

Is the user a domain account?

Is this server connected to a domain or just a workgroup?
lgaddam
Posts: 116
Joined: Wed Aug 28, 2019 1:01 am

Re: Except CPU, Uptime other services working fine

Post by lgaddam »

Thanks for the reply.
WMi account used in our environment is Domain level & it is added on each Domain server in Local Administrator group.
All server having this issue are part of Domain not a work station.

The article provided by you require reboot for a hotfix. Right now 2008 servers do not have support from microsoft. So reboot may be at risk in Prod machines.

I dont think there is an issue with user accounts...because Memory and Disk metrics working fine. If user account have issues then no OS metric will work.
lgaddam
Posts: 116
Joined: Wed Aug 28, 2019 1:01 am

Re: Except CPU, Uptime other services working fine

Post by lgaddam »

What I actually asking you that provide me solution if you have without reboot of the windows 2008 servers.
If there is no solution, please update that there is no solution for this error without reboot. SO that I will take it with management and get back to you.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Except CPU, Uptime other services working fine

Post by ssax »

Check the event logs on the windows system for any errors.

Does the check ever work or does it always fail?

You could try restarting the WMI service. Other than the link provided that's all I've found so far about known issues.

Please run both of these and send the entire output:

Code: Select all

wmic '--option=client ntlmv2 auth=Yes' -d 7 -U 'DOMAIN/USER%PASSWORD' --namespace 'root/cimv2' //192.168.72.138 'select PercentProcessorTime,Timestamp_Sys100NS from Win32_PerfRawData_PerfOS_Processor where Name="_Total"'

Code: Select all

wmic -d 7 --option=client ntlmv2 auth=Yes -U 'DOMAIN/USER%PASSWORD' --namespace 'root/cimv2' //192.168.72.138 'select PercentProcessorTime,Timestamp_Sys100NS from Win32_PerfRawData_PerfOS_Processor where Name="_Total"'
lgaddam
Posts: 116
Joined: Wed Aug 28, 2019 1:01 am

Re: Except CPU, Uptime other services working fine

Post by lgaddam »

Hi,

Please find the output in the attachment for provided wmic commands.
You do not have the required permissions to view the files attached to this post.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Except CPU, Uptime other services working fine

Post by ssax »

Does it work if you do this?

Code: Select all

/usr/local/nagios/libexec/check_wmi_plus.pl -H 192.168.72.138 -u 'xxxxxxl' -p 'xxxxxx' -m checkcpu --forcetruncateoutput 65536
lgaddam
Posts: 116
Joined: Wed Aug 28, 2019 1:01 am

Re: Except CPU, Uptime other services working fine

Post by lgaddam »

Executed requested command, below is the output.

[root@p01 ~]# /usr/local/nagios/libexec/check_wmi_plus.pl -H 192.168.72.138 -u 'xxxxxxl' -p 'xxxxxx' -m checkcpu --forcetruncateoutput 65536
UNKNOWN - Plugin Timed out (15 sec). There are multiple possible reasons for this, some of them include - The host 192.168.72.138 might just be really busy, it might not even be running Windows.
[root@p01 ~]#
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Except CPU, Uptime other services working fine

Post by ssax »

Are you able to do a remote session so that we can investigate this? If so, please create a ticket for this and include a link back to this forum thread so we can get a remote session setup:

https://support.nagios.com/tickets/

Once the ticket is received I will send you my calendar link through the ticket for you to book on my calendar (we can also look at the CRL one).
lgaddam
Posts: 116
Joined: Wed Aug 28, 2019 1:01 am

Re: Except CPU, Uptime other services working fine

Post by lgaddam »

Yes Sean. With WMI agent account, we can remotely login but we should not do any activities with this account.
If you require remote session, let me check with Windows team and arrange with meeting invite.
Definetly CRL one also we can include in this.

I will raise ticket shortly.
Locked