Hi All,

I'm currently evaluating Nagios for use in our company and I've run in to a 
small problem. For some reason the nrpe plugin is ignoring the $HOSTADDRESS$ 
argument and always returns stats for the localhost. The relevant parts of the 
configuration files are as follows:

/etc/nagios/nagios.cfg:
-----------------------
cfg_dir=/etc/nagios/hosts


/etc/nagios/commands.cfg:
-------------------------
define command{
        command_name    check_nrpe
        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$
        }

/etc/nagios/nrpe.cfg:
---------------------
command[check_disk1]=/usr/lib/nagios/plugins/check_disk -w 10% -c 5% -p /


hostX:/etc/nrpe.cfg:
--------------------
command[check_disk1]=/usr/local/nagios/libexec/check_disk -w 10% -c 5% -p /


/etc/hosts/hostX.cfg:
---------------------
define host{
        use                     linux-server            ; Name of host template 
to use
        host_name               hostX
        alias                   hostX
        address                 192.168.1.1
        }

define service{
        use                             remote-service            ; Name of 
service template to use
        host_name                       hostX
        service_description             Root Partition
        check_command                   check_nrpe!check_disk1
        }



If I change the check_nrpe command line in commands.cfg and the check_command 
of the hostX.cfg file to the following it works, but I don't want to repeat the 
hostname over and over as it will make adding new hosts awkward:

        command_line    $USER1$/check_nrpe -H $ARG1$ -c $ARG2$
        check_command                   check_nrpe!hostX!check_disk1


Please would somebody advise me why the $HOSTADDRESS$ argument isn't working??

Thanks,

Haydn.
Halian Ltd 
WWW.HALIAN.COM 

This email is confidential and intended solely for the use of the individual to 
whom it is addressed.

If you are not the intended recipient, be advised that you have received this 
email in error and that
any use, dissemination, forwarding, printing, or copying of this email is 
strictly prohibited.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Nagios-users mailing list
Nagios-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue. 
::: Messages without supporting info will risk being sent to /dev/null

Reply via email to