Remote hosts nrpe.conf
command[check_users]=/usr/lib64/nagios/plugins/check_users -w $ARG1$ -c $ARG2$
Monitoring host:
define command{
command_name check_nrpe
command_line /usr/lib64/nagios/plugins/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ -a $ARG2$
}
define service{
use local-service ; Name of service template to use
hostgroup_name linux-servers
service_description Current Users
check_command check_nrpe!check_users!15!20
}
I getting usage error with this configuration , please help
Best Answer
Change
check_nrpe!check_users!15!20
tocheck_nrpe!check_users!"15 20"
.With your current config, as far as Nagios is concerned:
But then your command only uses
ARG1
andARG2
, so the20
isn't passed to NRPE.You want ARG2 to be
"15 20"
, which NRPE will then split into two ARGs on the receiving side.