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 ?
Check_nt on nagios xi anomaly
Re: Check_nt on nagios xi anomaly
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.
"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.
Re: Check_nt on nagios xi anomaly
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
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
2013-11-19 12:54:58: error:modules\CheckSystem\CheckSystem.cpp
2013-11-19 12:54:58: error:modules\CheckSystem\CheckSystem.cpp
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
You are missing some slashes next to the drive letter definitions, try:
You only need to double slash when you define the command/check in the CCM as one is used to escape the slash.
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"Re: Check_nt on nagios xi anomaly
On terminal is ok. without slash to drive letter.
The problem is on CCM.
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
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
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:
$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
Ok,
How monitor windows performance counter for physicalDisk, IO, cache etc.... ?
How monitor windows performance counter for physicalDisk, IO, cache etc.... ?
Re: Check_nt on nagios xi anomaly
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"
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
Yes, that does seem to be what you want in this case. Did this work for you?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"
Former Nagios employee