Page 1 of 1

Escalation with hostgroup and servicegroup

Posted: Tue Apr 21, 2015 9:41 am
by airw
Does anyone know if service escalations can be configured using both: servicegroup_name and hostgroup_name?

#serviceescalation.cfg

Code: Select all

define serviceescalation{
	     first_notification           0
        last_notification           1
        notification_interval      0
        contact_groups           admin
        escalation_period        24x7
        escalation_options      c,r    
        servicegroup_name     ping, temp-sensors 
        hostgroup_name         routers-only
        }
It works by notifying admin, however it does not seem to recognize neither - hostgroup_name nor servicegroup_name and sends all type of services and hosts - like both lines didn't exist.

Alternatively if I replace

Code: Select all

        servicegroup_name     ping, temp-sensors 
with

Code: Select all

        service_description	PING
This time it does work fine and escalates 'ping' service only for specific hosts 'routers-only'.
Just wondering why it cannot grab the servicegroup instead.

Re: Escalation with hostgroup and servicegroup

Posted: Tue Apr 21, 2015 4:00 pm
by tmcdonald
Could possibly be a bug. What version of Core are you using?

Strictly speaking, according to the docs the servicegroup_name directive is not listed as a valid option for either Core 3 or Core 4:

http://nagios.sourceforge.net/docs/3_0/ ... escalation
http://nagios.sourceforge.net/docs/nagi ... escalation

Re: Escalation with hostgroup and servicegroup

Posted: Tue Apr 21, 2015 4:02 pm
by jdalrymple
So a servicegroup defines the grouping of hosts - it just does:
Core Objects wrote:The format of the member directive is as follows (note that a host name must precede a service name/description)
I guess then the question is you're trying to further filter down the results? You'll probably have to specify a new servicegroup such as ping-routers-only.

What does the escalations definition end up looking like in objects.cache?

Re: Escalation with hostgroup and servicegroup

Posted: Thu Apr 23, 2015 5:28 am
by airw
What version of Core are you using?
I'm sorry, I should have told that this is Icinga 1.12
I know that all directives are fine.
If this is not relevant, the thread can be closed, but really, I was looking for nagios/icinga logic I might be missing.
What does the escalations definition end up looking like in objects.cache?
There is no object.cache unfortunately.
Core Objects wrote:
The format of the member directive is as follows (note that a host name must precede a service name/description)
Did that and it helped a little.
Now it recognizes 'servicegroup_name' but it sends notification for all hosts (still not recognizing 'hostgroup_name' of routers-only).
you're trying to further filter down the results?
That's correct.

Briefly:
When I have: 'servicegroup_name' and 'hostgroup_name' directives it sends notifications for services I want but for all hosts.
When I have: 'description_name' and 'hostgroup_name' it links both hostgroups and a service from the directive.

Re: Escalation with hostgroup and servicegroup

Posted: Thu Apr 23, 2015 9:21 am
by jdalrymple
airw wrote:There is no object.cache unfortunately.
Wow - They've really went a different direction with that other project apparently. If it's that wildly different then I doubt our boards are the right place to troubleshoot, I'd head over to the boards for Icinga.
airw wrote:
you're trying to further filter down the results?
That's correct.
With that said - the right way to do this would be to create separate servicegroups based on hostgroups. I'm thinking you want to create multiple groupings, but only at the escalations level. My guess is that the logic to do this isn't in the product - it's not really sound logic. The grouping should be done in the groups, not in the notifications.

Re: Escalation with hostgroup and servicegroup

Posted: Fri Apr 24, 2015 9:09 am
by airw
Thanks for following up.
At this stage all I'd like to know is if this configuration would work in Nagios.
The grouping should be done in the groups, not in the notifications.
I wouldn't call that grouping. I just want to tell nagios/icinga to notify me (escalate to me) in case of the service 1 is down on host 1 and don't bother me if the service 2 is down on host 2 but keep monitoring though.

Directives "servicegroup" and "hostgroup" are there in nagios/icinga documentation (escalation part) and it should work. I wonder why it doesn't.

Re: Escalation with hostgroup and servicegroup

Posted: Fri Apr 24, 2015 9:28 am
by jdalrymple
airw wrote:Directives "servicegroup" and "hostgroup" are there in nagios/icinga documentation (escalation part) and it should work. I wonder why it doesn't.
Can you point us to where our documentation on servicegroups in escalations is? If you can point us to it we'll see about getting it removed - it really shouldn't be there since in our minds it yields unpredictable results.

Re: Escalation with hostgroup and servicegroup

Posted: Mon Apr 27, 2015 3:49 am
by airw
jdalrymple wrote: If you can point us to it we'll see about getting it removed - it really shouldn't be there
Couldn't find it. Must have been in Icinga docs.
This thread can be closed.
Thank you both for the effort anyway.

Re: Escalation with hostgroup and servicegroup

Posted: Mon Apr 27, 2015 9:01 am
by jdalrymple
You bet - I'll lock it up.

I hate leaving things unresolved though so I just want to re-mention that a servicegroup always implies a hostgroup (of some sort, not a hostgroup definition proper). When you are creating a servicegroup each service has to be associated to a host. The status of any service is useless without the context of the host. If you wish to attach a servicegroup to a hostgroup - the proper way is to include both of them in a "define service{" definition.

Locking thread now.