Page 1 of 1
contact_group for all services on a host
Posted: Fri Dec 11, 2015 7:31 pm
by lichterr
I'm wondering if there is an easy way to adjust contact_group for all services on a host? I am sure this has been answered many times on here, but I can't seem to find the answer.
Thanks!
Re: contact_group for all services on a host
Posted: Mon Dec 14, 2015 10:41 am
by hsmith
You could use a sed command.
Code: Select all
sed -i 's/oldcontact/newcontact/g' yourconfigname.cfg
Re: contact_group for all services on a host
Posted: Mon Dec 21, 2015 6:28 am
by lichterr
Thanks for your response, however I guess I wasn't very clear in my question. All of my hosts and services use one contact group, but for a new host and the services on it, i would like to use a different group. I can easily set the second contact group on the host itself, and all services that I have defined in that host's cfg, but there are many services that are monitored on this host but are defined by hostgroups, etc. so I'm wondering if there is a way to tell Nagios to use the secondary group for all services monitored on a particular host.
Re: contact_group for all services on a host
Posted: Mon Dec 21, 2015 4:35 pm
by Box293
Perhaps creating escalations is the answer you are looking for, as an escalation will over-ride any host or service defined contacts/contactgroups.
https://assets.nagios.com/downloads/nag ... tions.html