Is it possible to reference variables anywhere other than in commands?
That is, in within host and service definitions?

e.g.

define host{
        name                            generic-host
          ...
        register                        0

        #Default threshold vars
        #check_ping
        _WARNRTA                        100
        _CRITRTA                        500
        _WARNPL                         20%
        _CRITPL                         60%

define service{
        use                             generic-service
        hostgroup_name                  linux-servers
        service_description             PING

        check_command                   
check_ping!$_HOSTWARNRTA$!$_HOSTWARNPL$!$_HOSTCRITRTA$!$_HOSTCRITPL$
}

define command{
        command_name    check_ping
        command_line    $USER1$/check_ping -H $HOSTADDRESS$ -w          
$ARG1$,$ARG2$ -c $ARG3$,$ARG4$ -p 5
        }

If this doesn't work, is there another way to pass a value to $ARGn$ without 
changing the command definition to use the _HOST macros directly?

Are macros (and env variables) the only way to reference variables?

I hope this makes sense. Thanks.




CONFIDENTIALITY NOTICE: This e-mail may contain information that is privileged, 
confidential or otherwise protected from disclosure. If you are not the 
intended recipient of this e-mail, please notify the sender immediately by 
return e-mail, purge it and do not disseminate or copy it.

-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Nagios-users mailing list
[email protected]
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