[Nagiosplug-help] confused about argument passing in nrpe

Gil Vidals gvidals at gmail.com
Tue Oct 16 01:18:33 CEST 2007


I need help in understanding how nagios remote server accept arguments. It
seems to me that the plug-ins have different methods of accepting args from
the nagios host. Sometimes the args are delimited by "!" and sometimes by "
". Look at the two examples below.

   # NAGIOS HOST: Define a service to check "hard drive"
    define service{
        use                             office-service
        host_name                       minsk
        service_description           Disk Free
        check_command                   check_nrpe!check_disk!20%!10%
    }

^^^^ args delimited by "!"

But look how I had to pass in arg2 and arg3 to get the command to work.

   #REMOTE SERVER:
    command[check_disk]=/usr/local/nagios/libexec/check_disk -w $ARG2$ -c
$ARG3$ -u MB -e -A

^^^^^^           ^^^^
This second plugin also works, but there is a space as a delimiter instead
of "!"

NAGIOS HOST
# Define a service to check "processes"
define service{
        use                             office-service
        host_name                       minsk
        service_description            MLMainDriver.pl
        check_command               check_nrpe!check_procs!1:1
MLMainDriver.pl

^^^^ args delimited by space

And here arg1 and arg2 are passed.

  # REMOTE SERVER
  command[check_load]=/usr/local/nagios/libexec/check_load -w $ARG1$ -c
$ARG2$

NAGIOS HOST
define command{
        command_name    check_nrpe
        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ -a
$ARG2$ $ARG3$
        }




---
Gil at Vidals.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-plugins.org/archive/help/attachments/20071015/f075326a/attachment.html>


More information about the Help mailing list