2

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

2 Answers 2

1

Change check_nrpe!check_users!15!20 to check_nrpe!check_users!"15 20".

With your current config, as far as Nagios is concerned:

ARG1 = check_users
ARG2 = 15
ARG3 = 20

But then your command only uses ARG1 and ARG2, so the 20 isn't passed to NRPE.

You want ARG2 to be "15 20", which NRPE will then split into two ARGs on the receiving side.

0

You can try passing the actual values as thresholds in nrpe.cfg/nrpe.conf on remote host in place of $ARG1$ and $ARG2$.

Eg : command[check_users]=/usr/lib64/nagios/plugins/check_users -w 15 -c 20

Along with this just to be sure, do check if :

  1. Check_Users command defined properly in commands.cfg on monitoring host.

  2. check if path of plugin(check_users) used in config files is correct and permissions are setup properly.

Rest seems to be fine and if above doesn't work, then paste the actual error.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .