[PATCH] Fix to allow incomplete service dependency templates

Jason Hoos jhoos at thwack.net
Wed Dec 6 00:02:39 CET 2006


The attached patch fixes a problem with parsing service dependency 
templates that specify "hostgroups" without "dependent_hostgroups" or 
vice versa.  The following config snippet triggers the bug:

define host {
        use generic-host  ; generic host template omitted for brevity
        host_name b
}

define hostgroup {
        hostgroup_name test-hg
        alias test-hg
        members a,b
}

define servicedependency {
        register 0
        name base-sd
        hostgroups test-hg
}

Since it's not a registered object, the servicedependency template should be
valid, but Nagios reports "Could not expand dependent hostgroups and/or 
hosts
specified in service dependency" instead.

This patch applies to both Nagios 2.5 and 2.6.

Jason Hoos


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: nagios-2.5-partial-deps-fix.diff
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20061205/ef7e2b7c/attachment.ksh>
-------------- next part --------------
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
-------------- next part --------------
_______________________________________________
Nagios-devel mailing list
Nagios-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-devel


More information about the Developers mailing list