Syntax Needed for NRPE CheckCounter with Service Definition
Posted: Wed Apr 13, 2011 4:09 am
Hello All,
I have been trying to use the NRPE CheckCounter in my Nagios 3.2 setup . What i am trying to do is create a command definition that would accept an Counter parameter as follows:
define command{
command_name check_nrpe_win_counter
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -p 5666 -c CheckCounter -a "Counter=$ARG1$" ShowAll MaxWarn=$ARG2$ MaxCrit=$ARG3$
}
then define a service as:
define service{
use generic-service
host MyHost
check_command check_nrpe_win_counter!"\Paging File(_Total)\% Usage"!80%!90%
}
After using this all i get is "CRIT: Counter not found" error.
I am able to use the command from command line.
Also if a create the command definition directly without using the counter parameter (i.e instead of "Counter=$ARG1$" i directly define "Counter=\Paging File(_Total)\% Usage") as argument then it works fine, but then i would have to create n no of command definitions for n no of counter values which i dont want to do.
Please can some one give me the exact syntax.
Thanks in Advance
Ethan
I have been trying to use the NRPE CheckCounter in my Nagios 3.2 setup . What i am trying to do is create a command definition that would accept an Counter parameter as follows:
define command{
command_name check_nrpe_win_counter
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -p 5666 -c CheckCounter -a "Counter=$ARG1$" ShowAll MaxWarn=$ARG2$ MaxCrit=$ARG3$
}
then define a service as:
define service{
use generic-service
host MyHost
check_command check_nrpe_win_counter!"\Paging File(_Total)\% Usage"!80%!90%
}
After using this all i get is "CRIT: Counter not found" error.
I am able to use the command from command line.
Also if a create the command definition directly without using the counter parameter (i.e instead of "Counter=$ARG1$" i directly define "Counter=\Paging File(_Total)\% Usage") as argument then it works fine, but then i would have to create n no of command definitions for n no of counter values which i dont want to do.
Please can some one give me the exact syntax.
Thanks in Advance
Ethan