any macro for viewing host parent?
diego.roccia at gmail.com
diego.roccia at gmail.com
Tue Nov 9 23:10:43 CET 2010
Isn't it $_HOSTPARENT_HOST$ ?
btw, in order to avoid the double declaration (and human errors) you
could add in generic-host (ot whatever template you define)
define generic-host {
...
parents $_HOSTPARENT_HOST$
}
and in the real host definition you will define only the custom macro.
Haven't tried it, but it should work
On Tue, Nov 9, 2010 at 7:55 PM, Paul M. Dubuc <work at paul.dubuc.org> wrote:
> Paul M. Dubuc wrote:
>> John Alberts wrote:
>>> I would like to have our notification emails for service alerts, include
>>> the host parent. Is there any existing macro I can use to include
>>> this? I couldn't find anything when googling. If not, any suggesions
>>> how I might get it in an email?
>>>
>>
>> The way we do this is to use a user-defined macro in the host definition like so:
>>
>>
>> define host{
>> use aps-launcher
>> host_name APS-P52
>>
>> parents aps52
>> __PARENT_HOST aps52
>> }
>>
>> Then you can expand expand it, $_PARENT_HOST$, in the notification.
>
> I mean that would be $_HOST_PARENT_HOST$
>
>> Unfortunately this means you need to define the parent in 2 places. Would be
>> nice if there was built-in macro for this, but I don't think there is.
>
> ------------------------------------------------------------------------------
> The Next 800 Companies to Lead America's Growth: New Video Whitepaper
> David G. Thomson, author of the best-selling book "Blueprint to a
> Billion" shares his insights and actions to help propel your
> business during the next growth cycle. Listen Now!
> http://p.sf.net/sfu/SAP-dev2dev
> _______________________________________________
> 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
>
--
Diego Roccia
diego.roccia (at) gmail (dot) com
------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a
Billion" shares his insights and actions to help propel your
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
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