Nagios Bug and Feature Tracker
Bug and Feature Tracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000102 [Nagios Core] Configuration Parsing minor always 2009-11-05 15:46 2010-02-01 09:37
Reporter twilde View Status public  
Assigned To tonvoon
Priority normal Resolution fixed  
Status closed  
Summary 0000102: Service escalations and negated service descriptions
Description Short version: When trying to set up a service escalation definition for all services except one, on all hosts in a given hostgroup, wherein not all of the hosts actually HAVE the service we are trying to exclude, an error is returned of the form:

Error: Could not find a service matching host name 'servXX' and
description 'NTP Time Offset' (config file
'/usr/local/nagios-3.2.0/etc/objects/escalations.cfg', starting on line 62)
Error: Could not expand services specified in service escalation (config
file '/usr/local/nagios-3.2.0/etc/objects/escalations.cfg', starting on
line 62)
   Error processing object config files!

But, because I am negating that service in my serviceescalation, which looks something like this:

define serviceescalation {
        host_name *
        hostgroup_name !gtpods
        service_description *,!NTP Time Offset
        first_notification 1
        last_notification 5
        notification_interval 10
        contact_groups admins,oncall
}

I would posit that the correct behavior would be to simply ignore the lack of "NTP Time Offset" service on the host in question and continue normally. This is in fact the behavior in other bits of the code, I believe.

I've attached a patch against xdata/xodtemplate.c that simply adds a check of reject_item to two conditionals within xodtemplate_expand_services, which should make this work in the way that I perceive to be intuitive without compromising any other configuration scenarios. This patch should apply cleanly against the xdata/xodtemplate.c in CVS.

We have been running a Nagios 3.2.0 instance with this patch for about a month now without any issues, and it has not negatively impacted any of our other configuration items.

For slightly more detail, and a couple of folks in the community who also believe the patched behavior to be correct, see my thread on nagios-devel started 10/5/2009, subject "[Nagios-devel] [PATCH] Service escalations and negated service descriptions".

Thanks for your time in looking at this request!
Additional Information
Tags No tags attached.
Nagios Version 3.2.0
OS Linux
OS Version RHEL4
Attached Files ? file icon xodtemplate.c.patch [^] (702 bytes) 2009-11-05 15:46
? file icon xodtemplate-with-tests.patch [^] (4,396 bytes) 2010-01-28 09:45

- Relationships

-  Notes
(0000134)
twilde (reporter)
2010-01-28 09:46

The xodtemplate-with-tests.patch file just uploaded supersedes (and in fact includes) xodtemplate.c.patch - this file includes an update to the minimal.cfg and precached objects files which fail before the xodtemplate.c change is applied, but succeed after it is applied.
(0000135)
tonvoon (administrator)
2010-02-01 09:37

Thanks Tim. Applied in CVS.

- Issue History
Date Modified Username Field Change
2009-11-05 15:46 twilde New Issue
2009-11-05 15:46 twilde File Added: xodtemplate.c.patch
2009-11-05 15:46 twilde Nagios Version => 3.2.0
2009-11-05 15:46 twilde OS => Linux
2009-11-05 15:46 twilde OS Version => RHEL4
2009-12-15 08:48 twilde Issue Monitored: twilde
2010-01-28 09:45 twilde File Added: xodtemplate-with-tests.patch
2010-01-28 09:46 twilde Note Added: 0000134
2010-02-01 09:31 tonvoon Status new => assigned
2010-02-01 09:31 tonvoon Assigned To => tonvoon
2010-02-01 09:37 tonvoon Note Added: 0000135
2010-02-01 09:37 tonvoon Status assigned => closed
2010-02-01 09:37 tonvoon Resolution open => fixed


Mantis 1.1.7[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker