$USERn$ macros in services.cfg

Lori Adams ladams at cloudmark.com
Tue Jul 19 00:37:02 CEST 2005


I have set up a $USERn$ macro with a username and password:

ie: in resources.cfg:

            $USER5$=foo:bar

 

in checkcommands, I have set up an http check:

define command {
      command_name            check_http_args

      command_line            command_line    $USER2$/check_http -H
$HOSTADDRESS$ $ARG1$ -a $ARG2$ -u $ARG3$

      }

 

here was the service check

define service {

      use                     template   ##with lots of details already
specified

      service_description     http_check

      host_name               localhost

      check_command            check_http_args!-t
30!$USER5$!http://url.to.check

      }

 

$ARG2$ does not get replaced with $USER5$, instead $USER5$ is in the
command.

$   ./check_http -H localhost -t 30 -a $USER5$ -u http://url.to.check

Segmentation fault

 

I am using nagios 1.2 with plugins 1.4.

 

Am I missing something?  The docs
http://nagios.sourceforge.net/docs/1_0/macros.html say that $USERn$
macros can be used in service checks.

 

Thanks,

-Lori

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20050718/4bc932fc/attachment.html>


More information about the Users mailing list