Re: [Nagios-devel] [PATCH] Fix to allow incomplete service

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

Re: [Nagios-devel] [PATCH] Fix to allow incomplete service

Post by Guest »

Jason Hoos wrote:
> 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
>

Actually, I think this should result in an error message, even though
the template dependency isn't going to be registered. Better to catch a
problem earlier, rather than later when the template is being used.

Ethan Galstad,
Nagios Developer
---
Email: [email protected]
Website: http://www.nagios.org





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked