All of my service checks are based on templates where notifications are enabled, the notification period set to 24x7, notification type is set to U,C etc. But there are no contacts or contact groups associated in the service check templates.

When I add a new service check, the check is always based on one of these templates. However I still don't add any contacts or groups to the actual checks themselves.

The checks all get added to to a service group called Critical-Services.

I also have a number of users who are members of a contact group called Duty-Admin-Pagers.

I have a service escalation configured with a linked contact group of Duty-Admin-Pagers (above) and with a servicegroup_name of Critical-Services, it looks like this:

define serviceescalation{
    servicegroup_name Critical-Services
    contact_groups Duty-Admin
    first_notification 1
    last_notification 999
    notification_interval 1
    escalation_period 24x7
    escalation_options u,c

Whenever a service goes CRITICAL HARD and exceeds the number of retries I get pager alerts fired off just as I expect to the Duty-Admin group members.

However when I load this configuration into Nagios I get warnings such as:

Warning Service 'APC-Power-Output' on host 'APC-PDU-0299' has no default contacts or contactgroups defined!

The escalation and notifications still work and still send notifications to the contact_group Duty-Admin defined in the service escalation.

I find this a convenient configuration because it means I don't have to explicitly define contacts or contact groups at either the service template or service check itself and makes management somewhat simpler.

Despite the warnings, and even though this configuration works just fine, is it recommended?

  • I'm curious as to why you're using service escalations to do this. Why not normal notifications, and contact groups? – Jon Angliss Jul 23 '11 at 4:14
  • Because the real world implementation uses three different service escalations to alert three different groups of users over the lifetime of an alert. – Kev Jul 23 '11 at 11:19

I always look at these warings this way. If one is new to Nagios, then Nagios is suggesting something may not be quite right and maybe you should look at it. Once yo uknow what you are doing, ignoring these warnings is an informed decision. If it works for you, stick with it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.