any macro for viewing host parent?

Paul M. Dubuc work at paul.dubuc.org
Tue Nov 9 19:55:28 CET 2010


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





More information about the Users mailing list