Page 1 of 2
Check_nt on nagios xi anomaly
Posted: Mon Nov 18, 2013 9:03 am
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 ?
Re: Check_nt on nagios xi anomaly
Posted: Mon Nov 18, 2013 11:36 am
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?)
Re: Check_nt on nagios xi anomaly
Posted: Tue Nov 19, 2013 7:00 am
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

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

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

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
Re: Check_nt on nagios xi anomaly
Posted: Tue Nov 19, 2013 12:09 pm
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.
Re: Check_nt on nagios xi anomaly
Posted: Wed Nov 20, 2013 7:36 am
by lampil
On terminal is ok. without slash to drive letter.
The problem is on CCM.
Re: Check_nt on nagios xi anomaly
Posted: Wed Nov 20, 2013 1:31 pm
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.
Re: Check_nt on nagios xi anomaly
Posted: Wed Nov 27, 2013 5:15 am
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"
Re: Check_nt on nagios xi anomaly
Posted: Wed Nov 27, 2013 5:18 am
by lampil
Ok,
How monitor windows performance counter for physicalDisk, IO, cache etc.... ?
Re: Check_nt on nagios xi anomaly
Posted: Wed Nov 27, 2013 5:32 am
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"
Re: Check_nt on nagios xi anomaly
Posted: Wed Nov 27, 2013 10:03 am
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?