Problem with monitoring Windows 2012 R2 servers

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Problem with monitoring Windows 2012 R2 servers

Post by tgriep »

Could you post how the command is setup in NagiosXI command.cfg file and the service file?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Frédéric GRANAT
Posts: 445
Joined: Mon Nov 19, 2012 11:36 am

Re: Problem with monitoring Windows 2012 R2 servers

Post by Frédéric GRANAT »

define command {
command_name check_win_cpu
command_line $USER1$/check_wmi_plus.pl -H $HOSTADDRESS$ -u $ARG1$ -p $ARG2$ -m checkcpu -w $ARG3$ -c $ARG4$ $ARG5$
}
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Problem with monitoring Windows 2012 R2 servers

Post by tgriep »

Shouldn't the command be using the new check_wmi_plus_latest.pl perl script instead of the old check_wmi_plus.pl perl script?

Can you provide the service check that is using the check_win_cpu so we can see how the arguments are setup?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Frédéric GRANAT
Posts: 445
Joined: Mon Nov 19, 2012 11:36 am

Re: Problem with monitoring Windows 2012 R2 servers

Post by Frédéric GRANAT »

Hi,
Shouldn't the command be using the new check_wmi_plus_latest.pl perl script instead of the old check_wmi_plus.pl perl script?
=> Running check_wmi_plus_latest.pl in command line doesn't work, so what's the point of testing a command using check_wmi_plus_latest.pl ?

Can you provide the service check that is using the check_win_cpu so we can see how the arguments are setup?
=> Here's the command view in the service template :
$USER1$/check_wmi_plus.pl -H $HOSTADDRESS$ -u $ARG1$ -p $ARG2$ -m checkcpu -w $ARG3$ -c $ARG4$ $ARG5$

$ARG1$=login
$ARG2$=password
$ARG3$=80
$ARG4$=90
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Problem with monitoring Windows 2012 R2 servers

Post by tgriep »

Everything looks good so far. Last thing to try is can you delete the service from XI, delete the state files from the /tmp folder recreate the service and see if it works.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Frédéric GRANAT
Posts: 445
Joined: Mon Nov 19, 2012 11:36 am

Re: Problem with monitoring Windows 2012 R2 servers

Post by Frédéric GRANAT »

I created the following objects :

define command {
command_name check_win_cpu_latest
command_line $USER1$/check_wmi_plus_latest.pl -H $HOSTADDRESS$ -u $ARG1$ -p $ARG2$ -m checkcpu -w $ARG3$ -c $ARG4$ $ARG5$
}

define service {
name windows-cpu-latest
use windows
check_command check_win_cpu_latest!svc_riverbed!dsisvc!80!90!!!!
register 0

}

define service {
host_name W2K-APPLI16.cg.ahp
service_description CPU Usage
use windows-cpu-latest
register 1
}

It fails :

UNKNOWN - The WMI query had problems. You might have your username/password wrong or the user's access level is too low. Wmic error text on the next line.
cmerchant
Posts: 546
Joined: Wed Sep 24, 2014 11:19 am

Re: Problem with monitoring Windows 2012 R2 servers

Post by cmerchant »

UNKNOWN - The WMI query had problems. You might have your username/password wrong or the user's access level is too low. Wmic error text on the next line.
Was there an additional line to this error message?
Frédéric GRANAT
Posts: 445
Joined: Mon Nov 19, 2012 11:36 am

Re: Problem with monitoring Windows 2012 R2 servers

Post by Frédéric GRANAT »

Same message than the once given a few posts ago :

UNKNOWN - The WMI query had problems. You might have your username/password wrong or the user's access level is too low. Wmic error text on the next line.
[librpc/rpc/dcerpc_util.c:1290:dcerpc_pipe_auth_recv()] Failed to bind to uuid 4d9f4ab8-7d1c-11cf-861e-0020af6e7c57 - NT_STATUS_NET_WRITE_FAULT
[librpc/rpc/dcerpc_connect.c:790:dcerpc_pipe_connect_b_recv()] failed NT status (c0000022) in dcerpc_pipe_connect_b_recv
[wmi/wmic.c:196:main()] ERROR: Login to remote object.
NTSTATUS: NT_STATUS_ACCESS_DENIED - Access denied
User avatar
lmiltchev
Former Nagios Staff
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Problem with monitoring Windows 2012 R2 servers

Post by lmiltchev »

Usually you get this error when your user has a limited permission access to WMI datasources, i.e. local users group has been removed from "acces this computer from the network" in User Rights Assignment of the Local Group Policy. You could try re-adding that permission to the account in order to fix the issue.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Frédéric GRANAT
Posts: 445
Joined: Mon Nov 19, 2012 11:36 am

Re: Problem with monitoring Windows 2012 R2 servers

Post by Frédéric GRANAT »

Hi,
Please explain me how to re-add that permission to the account

Frederic
Locked