I have an existing Nagios 2.x setup that’s fairly complex and working well. Among other things it has both host & service escalations defined for both paging and sending e-mail. Most of our hosts are in a hostgroup that sends out pager notifications.
I just added a new service check that we want to send notifications by e-mail only. The host that the service check is on is in the hostgroup for paging. I really don’t want to have to pull the host from that hostgroup and add individual services to the paging service group since there are a good number of services being checked on this host.
What is the easiest way to have a host use one notification method for all services except for one and a different notification method for the other service?
You can just add a different contact_group to your “special” service definition which will override the template definition.
I don’t know how you defined your contact or contact groups for that “special” service, or have you done that at all. I will suppose you haven’t. Create a contact definition with email addresses which you would like to get the notifications for that service, then add them to contact_group. For those contact definitions only use host-notify-by-email and service-notify-by email commands. After that, in the “special” service definition put that contact_group you’ve defined and it should work. It should override the hostgroup setting.
In simple way, the answer to your question is: just put other contact_group in that service definition.