Suggestions for easily adding host and service escalations

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
edgeweb
Posts: 28
Joined: Tue Mar 30, 2010 2:25 pm

Suggestions for easily adding host and service escalations

Post 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
mmestnik
Posts: 972
Joined: Mon Feb 15, 2010 2:23 pm

Re: Suggestions for easily adding host and service escalations

Post by mmestnik »

Yes, hostname * and service_description *.
http://nagios.sourceforge.net/docs/3_0/ ... escalation
edgeweb
Posts: 28
Joined: Tue Mar 30, 2010 2:25 pm

Re: Suggestions for easily adding host and service escalations

Post 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
mmestnik
Posts: 972
Joined: Mon Feb 15, 2010 2:23 pm

Re: Suggestions for easily adding host and service escalations

Post by mmestnik »

I'll ask the NagiosQL group. This should be an option, perhaps you could create a service called *?
mmestnik
Posts: 972
Joined: Mon Feb 15, 2010 2:23 pm

Re: Suggestions for easily adding host and service escalations

Post 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!
edgeweb
Posts: 28
Joined: Tue Mar 30, 2010 2:25 pm

Re: Suggestions for easily adding host and service escalations

Post 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
mmestnik
Posts: 972
Joined: Mon Feb 15, 2010 2:23 pm

Re: Suggestions for easily adding host and service escalations

Post by mmestnik »

That's exactly what you should do.
edgeweb
Posts: 28
Joined: Tue Mar 30, 2010 2:25 pm

Re: Suggestions for easily adding host and service escalations

Post 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
edgeweb
Posts: 28
Joined: Tue Mar 30, 2010 2:25 pm

Re: Suggestions for easily adding host and service escalations

Post 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
Locked