Page 1 of 1

Suggestions for easily adding host and service escalations

Posted: Fri May 14, 2010 10:00 am
by edgeweb
Hey guys,
We've gotten to a point where we would like to configure escalations for our host and service notifications. The problem is, we currently have none and I would like to add the escalation group to all of our hosts and services. So I have some questions:
Does the escalations group need to be added as a contact group to all of the hosts and services?
Is there an easier way to add the service escalations to all services on all hosts?

Thanks in advance,

Dave

Re: Suggestions for easily adding host and service escalations

Posted: Sun May 16, 2010 3:31 pm
by mmestnik
Yes, hostname * and service_description *.
http://nagios.sourceforge.net/docs/3_0/ ... escalation

Re: Suggestions for easily adding host and service escalations

Posted: Mon May 17, 2010 11:38 am
by edgeweb
OK, cool, but it doesn't look like the NagiosQL interface will let you do that. I tried adding a new service escalation, set the host to "*", hostgroup to "*", but the "services" area doesn't populate (no "*") available for it. Should this be done via manual object definitions? Thanks again!

Dave

Re: Suggestions for easily adding host and service escalations

Posted: Mon May 17, 2010 11:41 am
by mmestnik
I'll ask the NagiosQL group. This should be an option, perhaps you could create a service called *?

Re: Suggestions for easily adding host and service escalations

Posted: Mon May 17, 2010 12:19 pm
by mmestnik
http://www.nagiosql.org/_mantis/view.php?id=280

Please leave contacting up-stream to us, use our form and we will update the NagiosQL bug tracker on your behalf.

Thank you!

Re: Suggestions for easily adding host and service escalations

Posted: Tue May 18, 2010 12:13 pm
by edgeweb
Thanks mmestnik!

In the near term, are there any problems with adding a file to the /usr/local/nagios/etc/static directory for the escalation? It would only contain the one:

define sampleEscalation {
host_name *
service_description *
first_notification 3
last_notification 0
notification_interval 10
contact_groups mygroup
}

Thanks again!

Dave

Re: Suggestions for easily adding host and service escalations

Posted: Tue May 18, 2010 12:47 pm
by mmestnik
That's exactly what you should do.

Re: Suggestions for easily adding host and service escalations

Posted: Tue May 18, 2010 5:12 pm
by edgeweb
Doesn't seem like Nagios likes the host_name *, service_description *:
config:

Code: Select all

define serviceescalation {
        host_name               *
        service_description     *
        first_notification      3
        last_notification       0
        notification_interval   10
        contact_groups          EWHEscalations
preflight check:

Code: Select all

Error: Could not expand services specified in service escalation (config file '/usr/local/nagios/etc/static/ewhescalations.cfg', starting on line 1)
Some searching makes this sound like I may have a host somewhere without a service, so I'm trying to think of ways to find that.

Dave

Re: Suggestions for easily adding host and service escalations

Posted: Tue May 18, 2010 5:48 pm
by edgeweb
Hosts without services were the problem. For anyone else who might run into it, you can run this query (sorry for the ugly) against the nagiosql database:

Code: Select all

select A.host_name, B.service_description
from tbl_host A
    left outer join tbl_lnkServiceToHost C on  C.idSlave = A.id
    left outer join tbl_service B ON B.id = C.idMaster
If you look through them and see any where the server_description is null, then you have a host with no services configured.

Hope that might help someone else.

It does still appear that the issue with the NagiosQL configuration of escalations still exists, even with this change.

Thanks,

Dave