SuperRoot
asked on
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?
What do you think I should do?
what problem exactly are you having? this is a fairly simple configuration.
Various digest plugins can compensate for too high volume or drop useless notifications.
Alternatively you can start nagios anew.
Alternatively you can start nagios anew.
ASKER
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.
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.
In the service description you should be able to override the default by specifying the configuration parameter to monitor those hosts.
ASKER
wait how do you do that?
Any variable defined in the template should be configurable within the section of the host service you are monitoring.
ASKER
not sure I'm following you. Maybe a good example might work? :)
ASKER
sorry for the stupid question. I'm just not sure how to do this. :(
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.
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.
ASKER
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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.