[Nagiosplug-help] Macros not evaluated in hostextinfo definition?

Thomas Guyot-Sionnest dermoth at aei.ca
Thu Dec 21 00:45:49 CET 2006


Ralph.Grothe at itdz-berlin.de wrote:
> Hello all,
> 
[...]
> 
> define hostextinfo {
>     ...
>     notes_url
> http://$USER15$@$HOSTADDRESS:somehost$:$USER17$/isa/bin/summary.p
> l?env=some_ids_inst
>     ...
> }
> 
> 
> Unfortunately nagios isn't expanding the macros as I would have
> wished.
> Instead it simply omitted any substitutions and made up this sham
> url:
> 
> http://:/isa/bin/summary.pl?env=ahw32_shm
> 

Are you sure $HOSTADDRESS:somehost$ is implemented in the current
release of Nagios? Actually I'm not really sure but I think it's a
Nagios 3 feature. Did you try to replace $HOSTADDRESS:somehost$ by the
actual host address?

I use macros in host and service extinfo but I assign them in templates.
Maybe if you try:

define hostextinfo {
    name sometemplate
    notes_url
http://$USER15$@$HOSTADDRESS:somehost$:$USER17$/isa/bin/summary.p
l?env=some_ids_inst
    register 0
}

define hostextinfo {
    ...
    use sometemplate
}

Thomas




More information about the Help mailing list