Page 2 of 2

Re: More fun with escalations

Posted: Thu Aug 22, 2013 8:28 am
by BanditBBS
jsharris wrote:I'll give it a try!

BanditBBS, how do I create a static config file? The content you provided matches what shows up in my config file when I configure it through the GUI but it doesn't verify. How do I bypass that and force it?
I wasn't sure if the escalation setup in CCM allowed usage of wildcards. Are you sure it is failing on that escalation? If you have had it roll back prior, I've seen that cause issues with verify. Can you post the error that you see when hitting the verify button?

The one issue you will run into, this will error out and not work if any of your hosts have NO services setup on them. I ran into this issue myself and I created a dummy service that is passive and doesn't ever do anything and added it to all hosts to get around this issue. Did I explain that well enough?

Jim

Re: More fun with escalations

Posted: Thu Aug 22, 2013 9:05 am
by jsharris
Here is the displayed error:

Code: Select all

Error: Could not expand services specified in service escalation (config file '/usr/local/nagios/etc/serviceescalations.cfg', starting on line 14) 
Here is the content of the serviceescalations.cfg file:

Code: Select all

###############################################################################
#
# Service escalations configuration file
#
# Created by: Nagios QL Version 3.0.3
# Date:       2013-08-22 09:19:10
# Version:    Nagios 3.x config file
#
# --- DO NOT EDIT THIS FILE BY HAND ---
# Nagios QL will overwite all manual settings during the next update
#
###############################################################################

define serviceescalation {
        host_name                               *
        service_description                     *
        contacts                                tickets
        first_notification                      1
        last_notification                       1
        notification_interval                   60
        escalation_period                       xi_timeperiod_24x7
        escalation_options                      c,
        }

define serviceescalation {
        host_name                               *
        service_description                     *
        contact_groups                          IT-Alerts
        first_notification                      1
        last_notification                       0
        notification_interval                   60
        escalation_period                       xi_timeperiod_24x7
        escalation_options                      w,c,r,
        }

###############################################################################
#
# Service escalations configuration file
#
# END OF FILE
#
###############################################################################
At this point these are the only service escalations that I have configured and to my knowledge all hosts have at the very least a ping service set up.

Re: More fun with escalations

Posted: Thu Aug 22, 2013 9:12 am
by BanditBBS
jsharris wrote:At this point these are the only service escalations that I have configured and to my knowledge all hosts have at the very least a ping service set up.
Yeah, I am 99% sure that error is due to it coming across a server that has zero services. I have servers that don't have a ping service on them beause all the hosts have host alive checks on the host itself, so having a ping service sort of doubles the ping checks. I would just make sure all servers have a service, verify that somehow.

Another thing you could do is limit the escalations to specific hostgroups for testing that you know for a fact all hosts have at least one service. It'd look like this:(of course change the data appropriately for your setup)

Code: Select all

define serviceescalation{
        hostgroup_name  network_oncall
        service_description *
        contact_groups  network_boss
        first_notification      4
        last_notification       0
        notification_interval   15
        }

Re: More fun with escalations

Posted: Thu Aug 22, 2013 10:01 am
by lmiltchev
jsharris, did you try the suggestions by BanditBBS? Is your issue resolved?

Re: More fun with escalations

Posted: Thu Aug 22, 2013 10:23 am
by jsharris
I created a test host group with two hosts in it that I knew absolutely had services configured and were not the same services. It successfully wrote, verified, and restarted! After digging through all of the hosts and services I found that there was one which did not appear to have a service attached. I deleted that host, changed the hosts and services on the escalations to *, and applied successfully. Testing my other settings now but it looks like this did the trick!

Thank you all for the help, gentlemen.

Bandit, you are 2 for 2 on getting me straightened out. Keep it up and I'll have to send flowers!