contact_group for all services on a host

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
lichterr
Posts: 2
Joined: Thu Jul 30, 2015 7:07 am

contact_group for all services on a host

Post 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!
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: contact_group for all services on a host

Post by hsmith »

You could use a sed command.

Code: Select all

sed -i  's/oldcontact/newcontact/g' yourconfigname.cfg
Former Nagios Employee.
me.
lichterr
Posts: 2
Joined: Thu Jul 30, 2015 7:07 am

Re: contact_group for all services on a host

Post 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.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: contact_group for all services on a host

Post 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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked