Check_nt on nagios xi anomaly

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
lampil
Posts: 7
Joined: Tue Jul 09, 2013 3:15 am

Check_nt on nagios xi anomaly

Post by lampil »

Hello,

I have a problem on Nagios xi
If test this command on terminal:
./check_nt -H MYHOSTADDRESS -s "mypass" -p 5666 -v COUNTER -l "\\PhysicalDisk(0 C: D:)\\Avg. Disk sec/Transfer","%.f"
I have a result.

On nagiosxi interface the command is truncated.
command on nagios xi interface:
$USER1$/check_nt -H $HOSTADDRESS$ -s "$ARG1$" -p 5666 -v COUNTER -l "\\PhysicalDisk(0 C: D:)\\Avg. Disk sec/Transfer","%.f"
but nrpe receive:
\\PhysicalDisk\(0 C: D:\)\\Avg. Disk sec/Transfer (with unwanted escape caracters)


Any idea ?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Check_nt on nagios xi anomaly

Post by abrist »

Is this happening with just the "test check command" in the interface, or with the actual check run by nagios as well? (do you see the error in the status output on the service details page?)
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
lampil
Posts: 7
Joined: Tue Jul 09, 2013 3:15 am

Re: Check_nt on nagios xi anomaly

Post by lampil »

Thx for you reponse.

If use command check test, the result is:
COMMAND: /usr/local/nagios/libexec/check_nt -H myhost -s "mypass" -p 5666 -v COUNTER -l "\\\\PhysicalDisk\(0 C: D:\)\\\\Avg. Disk sec/Transfer","%.f"
OUTPUT: 0 | %.f=0.000000%;0.000000;0.000000;
and the log file nsclient ++ (0.39.328)
2013-11-19 12:54:58: error:modules\CheckSystem\CheckSystem.cpp:1084: ERROR: Counter not found: \\PhysicalDisk\(0 C: D:\)\\Avg. Disk sec/Transfer: Unable to connect to the specified computer or the computer is offline. (800007D0)
2013-11-19 12:54:58: error:modules\CheckSystem\CheckSystem.cpp:1086: ERROR: Counter not found: \\PhysicalDisk\(0 C: D:\)\\Avg. Disk sec/Transfer: Unable to connect to the specified computer or the computer is offline. (800007D0)
2013-11-19 12:54:58: error:modules\CheckSystem\CheckSystem.cpp:1115: ERROR: PdhCollectQueryData failed: : No data to return. (800007D5) (\\PhysicalDisk\(0 C: D:\)\\Avg. Disk sec/Transfer|\\PhysicalDisk\(0 C: D:\)\\Avg. Disk sec/Transfer)

If I try on terminal:
./check_nt -H myhost -s "pass" -p 5666 -v COUNTER -l "\\PhysicalDisk(0 C: D:)\\Avg. Disk sec/Transfer","%.f"
the result on terminal:
0 | %.f=0.000067%;0.000000;0.000000;

and no error in nsclient log file
Last edited by lampil on Wed Nov 20, 2013 7:37 am, edited 1 time in total.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Check_nt on nagios xi anomaly

Post by slansing »

You are missing some slashes next to the drive letter definitions, try:

Code: Select all

./check_nt -H svctdo011.sesame.lan -s "sixsel" -p 5666 -v COUNTER -l "\PhysicalDisk(0 C:\ D:\)\Avg. Disk sec/Transfer","%.f"
You only need to double slash when you define the command/check in the CCM as one is used to escape the slash.
lampil
Posts: 7
Joined: Tue Jul 09, 2013 3:15 am

Re: Check_nt on nagios xi anomaly

Post by lampil »

On terminal is ok. without slash to drive letter.
The problem is on CCM.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Check_nt on nagios xi anomaly

Post by slansing »

You will not be able to run the test check command through the ccm on checks that require slash escaping, in this case you need only use "//" not "////". I'd make this change to your service wherever those slashes are in it, and then apply config > Check service from the services list in the Home menu.
lampil
Posts: 7
Joined: Tue Jul 09, 2013 3:15 am

Re: Check_nt on nagios xi anomaly

Post by lampil »

If you see the first post, the command on ccm haven't ////
$USER1$/check_nt -H $HOSTADDRESS$ -s "$ARG1$" -p 5666 -v COUNTER -l "\\PhysicalDisk(0 C: D:)\\Avg. Disk sec/Transfer","%.f"

The response on nagiosxi ccm:
If use command check test, the result is:
COMMAND: /usr/local/nagios/libexec/check_nt -H myhost -s "mypass" -p 5666 -v COUNTER -l "\\\\PhysicalDisk\(0 C: D:\)\\\\Avg. Disk sec/Transfer","%.f"
lampil
Posts: 7
Joined: Tue Jul 09, 2013 3:15 am

Re: Check_nt on nagios xi anomaly

Post by lampil »

Ok,

How monitor windows performance counter for physicalDisk, IO, cache etc.... ?
lampil
Posts: 7
Joined: Tue Jul 09, 2013 3:15 am

Re: Check_nt on nagios xi anomaly

Post by lampil »

Ok thx I have my response.

Not use check_nt, use check_nrpe:

./check_nrpe -H myhost -p myport -c CheckCounter -a "Counter=\\PhysicalDisk(_Total)\\Avg. Disk sec/Transfer"
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Check_nt on nagios xi anomaly

Post by tmcdonald »

lampil wrote:Ok thx I have my response.

Not use check_nt, use check_nrpe:

./check_nrpe -H myhost -p myport -c CheckCounter -a "Counter=\\PhysicalDisk(_Total)\\Avg. Disk sec/Transfer"
Yes, that does seem to be what you want in this case. Did this work for you?
Former Nagios employee
Locked