Passing Macros to $ARG1$

Brian E. Seppanen seppy at chartermi.net
Fri Jan 16 22:21:08 CET 2004


In the below text I should have indicated that I'm running nagios 1.1 with 
plugins 1.3.1, on a debian 3.0 test host.

The reason I'm trying to use the macro is that I have multiple service 
definitions in different files that will be using the same definition with 
only one argument different, being either $USER5$, $USER6$, or $USER7$.   
I'd rather use the shorthand macro than have to hardcode the value as 
that's what macros are for....




On Fri, 16 Jan 2004, Brian E. Seppanen wrote:

> I have a command definition that includes
> 
>         command_line    $USER1$/check_something -H $HOSTADDRESS$ -C $ARG1$
> 
> Often times I have a different argument that needs to be passed to -C
> 
> So I have various macros defined 
> 
> $USER5$=A
> $USER6$=B
> $USER7$=C
> 
> In my service definition I'm trying to do the following
> 
> define service{
>         use                             telepathic-service
> 
> 
>         hostgroup_name                  something
>         service_description             TEST
>         is_volatile                     0
>         check_period                    24x7
>         max_check_attempts              2
>         normal_check_interval           15
>         retry_check_interval            2
>         contact_groups                  me,myself,andi
>         notification_interval           60
>         notification_period             24x7
>         notification_options            c,r
>         check_command                   check_something!$USER5$
>         register                        1
>         }
> 
> It does not appear that $USER15$ is passed as $ARG1$ however
> 
> as I get invalid argument = 
> 
> from check_something.
> 
> Is there any way around this?
> 
> 
> 
> 
> Brian Seppanen
> seppy at chartermi.net
> 906-475-0107 ext 1040
> 

Brian Seppanen
seppy at chartermi.net
906-475-0107 ext 1040


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Nagios-users mailing list
Nagios-users at 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





More information about the Users mailing list