Page 2 of 2
Re: Phantom contacts
Posted: Fri Jul 29, 2011 2:54 pm
by hhlodge
I can't gleen that from this doc and I am using notify-service-by-email for notifications so I think it would be moot. If I am the cause, then so be it, but I think some weird stuff is going on "in there". I am just going to manually add the desired contact groups to each service so I know what's what succinctly.
Re: Phantom contacts
Posted: Fri Jul 29, 2011 4:50 pm
by mguthrie
XI is setup to use the "xi_host/service_notification_handler" commands for notifications. The "notifiy-host/service-by-email" commands still work, but they should only be added in addition to the "xi_.." commands. It is also recommended to add the custom macros outlined in the document as well for each contact, and the user-specific timeperiods.
With that said, if you get a system figured out that's working and you'd rather not mess with it, by all means stick with it. If there's some unpredictable behavior going on, I generally recommend that people recreate the contacts through the Admin->Manage Users page so that the correct values auto-populate.
Re: Phantom contacts
Posted: Mon Aug 01, 2011 8:06 am
by hhlodge
I'll have to look into how I would use those combined. The reason I don't use the xi service handler is because not all macros are available that I want in notifications, namely:
Notified: $NOTIFICATIONRECIPIENTS$
Additional Info: $SERVICEOUTPUT$\n$LONGSERVICEOUTPUT$
Acknowledged by: $SERVICEACKAUTHOR$
Comment: $SERVICEACKCOMMENT$
Re: Phantom contacts
Posted: Tue Aug 02, 2011 7:21 am
by hhlodge
So now I am seeing not enough recipients for what I think I have configured. So I must ask an embarrassingly basic question - if I have a contact_groups directive in a template and then add another contact group in XI in the alerts tab, is the XI value added to the list or does it replace the one in the template? It seems to be the latter but that goes against what I've always believed to be the Nagios way for configured objects.
Re: Phantom contacts
Posted: Tue Aug 02, 2011 9:23 am
by mguthrie
If you change a setting on a specific host or service, by default it will override a template setting. What you're needing to do is use additive inheritance, and currently this can only be done through the CCM.
Taken from:
http://nagios.sourceforge.net/docs/3_0/ ... tance.html
Additive Inheritance of String Values
Nagios gives preference to local variables instead of values inherited from templates. In most cases local variable values override those that are defined in templates. In some cases it makes sense to allow Nagios to use the values of inherited and local variables together.
This "additive inheritance" can be accomplished by prepending the local variable value with a plus sign (+). This features is only available for standard (non-custom) variables that contain string values. Take the following example:
Code: Select all
define host{
hostgroups all-servers
name generichosttemplate
register 0
}
define host{
host_name linuxserver1
hostgroups +linux-servers,web-servers
use generichosttemplate
}
In this case, the host linuxserver1 will append the value of its local hostgroups variable to that from generichosttemplate. The resulting effective definition of linuxserver1 is the following:
Code: Select all
define host{
host_name linuxserver1
hostgroups all-servers,linux-servers,web-servers
}
Re: Phantom contacts
Posted: Tue Aug 02, 2011 11:04 am
by hhlodge
Shoot! Bitten by my own ignorance.

Re: Phantom contacts
Posted: Wed Aug 03, 2011 9:17 am
by mguthrie
No worries, let us know if you have additional questions : )