Error in documentation re: custom object vars
Ethan Galstad
nagios at nagios.org
Sat Jul 28 18:03:25 CEST 2007
I thought it would be good to allow custom object macros that don't have
an underscore between HOST/SERVICE and the variable name. For example
_ID = $_HOSTID$ or $_SERVICEID$
That brings the naming convention more in line with the standard macros.
The only difference is the leading undersocre.
You can always force an underscore between the HOST/SERVICE identifier
by using two underscores in the custom variable name. Exmaple:
__ID = $_HOST_ID$ or $_SERVICE_ID$
Hendrik Bäcker wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi Ethan,
> hi list,
>
> I have a small veto...
>
> Wolfgang Barth has opened this topic a few weeks ago... we think that it
> is more read friendly to have:
>
> $_HOST_MAC_ADDRESS$
>
> instead of
>
> $_HOSTMAC_ADDRESS$
>
> The fact that this custom variable is dependent on the 'host' definition
> would be easier to see.
>
> In that case you have an underscore before and behind the dependent from
> as a field seperator.
>
> $_HOST_MAC_ADDRESS$ from host definition _MAC_ADDRESS
> $_SERVICE_SOME_WHAT$ from service def _SOME_WHAT.
>
> Or is the additional underscore getting things in trouble?!
>
> Regards,
> Hendrik
>
> Ethan Galstad schrieb:
>> Niklas Nordebo wrote:
>>> According to http://nagios.sourceforge.net/docs/3_0/macros.html the
>>> custom host variable _MAC_ADDRESS would be available in a macro
>>> called $_HOST_MAC_ADDRESS$, which is incorrect. As
>>> http://nagios.sourceforge.net/docs/3_0/customobjectvars.html states
>>> it will be available as $_HOSTMAC_ADDRESS$ without the extra
>>> underscore.
>>>
>> Thanks - I'll get this updated shortly.
>>
>>
Ethan Galstad,
Nagios Developer
---
Email: nagios at nagios.org
Website: http://www.nagios.org
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
More information about the Developers
mailing list