check_nrpe CheckCounter
-
hanya.radwan
- Posts: 194
- Joined: Tue Feb 25, 2014 6:12 am
- Location: palestine
check_nrpe CheckCounter
hi,
at Nagios 2014 R 1.0, paging file service is failed as the following:-
COMMAND: /usr/local/nagios/libexec/check_nrpe -H 10.100.20.194 -t 120 -c CheckCounter -a 'Counter=\\\\Paging File\(_Total\)\\\\% Usage' MaxWarn=85 MaxCrit=95 ShowAll
OUTPUT: CRIT: Counter not found: \\\\Paging File\(_Total\)\\\\% Usage: Unable to connect to specified machine or machine is off line. (800007D0)
at Nagios 2014 R 1.0, paging file service is failed as the following:-
COMMAND: /usr/local/nagios/libexec/check_nrpe -H 10.100.20.194 -t 120 -c CheckCounter -a 'Counter=\\\\Paging File\(_Total\)\\\\% Usage' MaxWarn=85 MaxCrit=95 ShowAll
OUTPUT: CRIT: Counter not found: \\\\Paging File\(_Total\)\\\\% Usage: Unable to connect to specified machine or machine is off line. (800007D0)
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: check_nrpe CheckCounter
The "Test Command" feature in the CCM will not work in all cases (especially extreme escaping required with performance counters), it is there for simple testing. Also, you should have " instead of ' around the arguments
Can you run the following from the XI command line?
Can you run the following from the XI command line?
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H 10.100.20.194 -t 120 -c CheckCounter -a "Counter=\\Paging File(_Total)\\% Usage" MaxWarn=85 MaxCrit=95 ShowAll-
hanya.radwan
- Posts: 194
- Joined: Tue Feb 25, 2014 6:12 am
- Location: palestine
Re: check_nrpe CheckCounter
it gives the following error from nagiosxi:
CRIT: Counter not found: \\Paging File(_Total)\\% Usage: Unable to connect to specified machine or machine is off line. (800007D0)
and when run command from nagios server, gives the following result:
[root@nms ~]# /usr/local/nagios/libexec/check_nrpe -H 10.100.20.194 -t 120 -c CheckCounter -a "Counter=\\Paging File(_Total)\\% Usage" MaxWarn=85 MaxCrit=95 ShowAll
OK: \Paging File(_Total)\% Usage: 16.1407|'\Paging File(_Total)\% Usage'=16.140747;85;95
CRIT: Counter not found: \\Paging File(_Total)\\% Usage: Unable to connect to specified machine or machine is off line. (800007D0)
and when run command from nagios server, gives the following result:
[root@nms ~]# /usr/local/nagios/libexec/check_nrpe -H 10.100.20.194 -t 120 -c CheckCounter -a "Counter=\\Paging File(_Total)\\% Usage" MaxWarn=85 MaxCrit=95 ShowAll
OK: \Paging File(_Total)\% Usage: 16.1407|'\Paging File(_Total)\% Usage'=16.140747;85;95
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: check_nrpe CheckCounter
So from the command line it is working correctly.
Can you show us the command definition as well as what you have in $ARGn$ for the service.
This should allow us to help you adjust it down to the correct settings.
Can you show us the command definition as well as what you have in $ARGn$ for the service.
This should allow us to help you adjust it down to the correct settings.
-
hanya.radwan
- Posts: 194
- Joined: Tue Feb 25, 2014 6:12 am
- Location: palestine
Re: check_nrpe CheckCounter
define service {
service_description Page File Usage
use xiwizard_nrpe_service
hostgroup_name RBT
servicegroups ALL
check_command check_nrpe!CheckCounter!-a 'Counter=\\Paging File(_Total)\\% Usage' MaxWarn=85 MaxCrit=95 ShowAll!!!!!!
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
first_notification_delay 0
notification_period xi_timeperiod_24x7
notification_options w,c,u,r,f,s,
notifications_enabled 1
contact_groups RBT
_xiwizard windowsserver
register 1
}
and this the command :$USER1$/check_nrpe -H $HOSTADDRESS$ -t 120 -c $ARG1$ $ARG2$
service_description Page File Usage
use xiwizard_nrpe_service
hostgroup_name RBT
servicegroups ALL
check_command check_nrpe!CheckCounter!-a 'Counter=\\Paging File(_Total)\\% Usage' MaxWarn=85 MaxCrit=95 ShowAll!!!!!!
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
first_notification_delay 0
notification_period xi_timeperiod_24x7
notification_options w,c,u,r,f,s,
notifications_enabled 1
contact_groups RBT
_xiwizard windowsserver
register 1
}
and this the command :$USER1$/check_nrpe -H $HOSTADDRESS$ -t 120 -c $ARG1$ $ARG2$
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: check_nrpe CheckCounter
The only real difference I see between your commands is the use of double quotes in your cli execution, and single quotes in the command definition. While I don't feel it should make a difference, let's try running it from command line the other way as well. Please return the output of these two commands:
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H 10.100.20.194 -t 120 -c CheckCounter -a "Counter=\\Paging File(_Total)\\% Usage" MaxWarn=85 MaxCrit=95 ShowAll
/usr/local/nagios/libexec/check_nrpe -H 10.100.20.194 -t 120 -c CheckCounter -a 'Counter=\\Paging File(_Total)\\% Usage' MaxWarn=85 MaxCrit=95 ShowAllNagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
-
hanya.radwan
- Posts: 194
- Joined: Tue Feb 25, 2014 6:12 am
- Location: palestine
Re: check_nrpe CheckCounter
[root@nms ~]# /usr/local/nagios/libexec/check_nrpe -H 10.100.20.194 -t 120 -c CheckCounter -a 'Counter=\\Paging File(_Total)\\% Usage' MaxWarn=85 MaxCrit=95 ShowAll]
CRIT: Counter not found: \\Paging File(_Total)\\% Usage: Unable to connect to specified machine or machine is off line. (800007D0)
[root@nms ~]# /usr/local/nagios/libexec/check_nrpe -H 10.100.20.194 -t 120 -c CheckCounter -a "Counter=\\Paging File(_Total)\\% Usage" MaxWarn=85 MaxCrit=95 ShowAll
OK: \Paging File(_Total)\% Usage: 16.2727|'\Paging File(_Total)\% Usage'=16.272736;85;95
CRIT: Counter not found: \\Paging File(_Total)\\% Usage: Unable to connect to specified machine or machine is off line. (800007D0)
[root@nms ~]# /usr/local/nagios/libexec/check_nrpe -H 10.100.20.194 -t 120 -c CheckCounter -a "Counter=\\Paging File(_Total)\\% Usage" MaxWarn=85 MaxCrit=95 ShowAll
OK: \Paging File(_Total)\% Usage: 16.2727|'\Paging File(_Total)\% Usage'=16.272736;85;95
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: check_nrpe CheckCounter
Is your machine having network issues or something? I would have expected to see an error relating to not finding the performance counter, not that your machine is offline. If the top command repeatedly fails, and the bottom one repeatedly works, let us know, but I would suggest trying them both a few times and making sure that the offline error is not specific to single quotes.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
-
hanya.radwan
- Posts: 194
- Joined: Tue Feb 25, 2014 6:12 am
- Location: palestine
Re: check_nrpe CheckCounter
greate it is Ok after use double qutes
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: check_nrpe CheckCounter
Awesome! I will lock this up then.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.