Different Nagios Contact groups for servers inside host groups

I setup nagios pager contact group but ran into problems setting it up on 40 services. Our nagios is setup using hostagroups for all services and there's 11 servers (in that host group) I need to setup that pager contact group.

What do you think I should do?
LVL 1
SuperRootAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jan SpringerCommented:
what problem exactly are you having?  this is a fairly simple configuration.
0
gheistCommented:
Various digest plugins can compensate for too high volume or drop useless notifications.
Alternatively you can start nagios anew.
0
SuperRootAuthor Commented:
Thank you for the advise. I guess to better explain this is by showing you what we have on service.

This is one of the examples of what services we have.
define service{
use                                  generic-template
hostgroup_name              linux-vmware
service_description      vmware-linux
check_command             "$USER1$/check_by_ssh -C <commands foo>"
         }

linux-vmware is a host group with 34 servers in it and 11(out of 34) needs to be in different contact groups(with pager). I can't drop the services especially if customers requested them to be monitored.
0
Newly released Acronis True Image 2019

In announcing the release of the 15th Anniversary Edition of Acronis True Image 2019, the company revealed that its artificial intelligence-based anti-ransomware technology – stopped more than 200,000 ransomware attacks on 150,000 customers last year.

Jan SpringerCommented:
In the service description you should be able to override the default by specifying the configuration parameter to monitor those hosts.
0
SuperRootAuthor Commented:
wait how do you do that?
0
Jan SpringerCommented:
Any variable defined in the template should be configurable within the section of the host service you are monitoring.
0
SuperRootAuthor Commented:
not sure I'm following you. Maybe a good example might work? :)
0
SuperRootAuthor Commented:
sorry for the stupid question. I'm just not sure how to do this. :(
0
Jan SpringerCommented:
in contacts.cfg, create a contact group and contact for those 11 servers.

in templates.cfg:
 copy the generic-host to generic-vm
 use the new contact_group

in your host configuration file, for each of those 11 hosts, you will have a statement using the generic-vm section of the template:

define host {
     use                            generic-vm
     host_name                customer1
     alias                           Real Name
     address                     192.168.100.23
     notification_period   24x7
}

this way you can keep your hosts organized within the groups that you want but some hosts can have different types of notification and contacts.

if you want a unique contact for each server, then you will need a unique contact, contact group and host template.
0
SuperRootAuthor Commented:
Sorry got tied up at work. Does this change applies to services right away without changing it? Or should copy a service and assign another template with generic-Vm contact group? I Just don't like copying and pasting or even creating new cfg file just for this group of servers
0
Jan SpringerCommented:
You should make a copy of the template that you wish to change and put your changes in the copy giving the copy a new name.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.