Re: [Nagios-devel] Reason for dropping contact_groups from hostgroup

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] Reason for dropping contact_groups from hostgroup

Post by Guest »

Yann DIRSON wrote:
> Hi all,
>
> I am using 2.0b3, and I'm hit, like others before me, by the removal of
> "contact_groups" from the hostgroup directive. Note that
> docs/notifications.html in 2.0b3 still mentions this feature.
>
> The changelog mentions that this feature was removed to make things
> consistent with service notifications, but does not explain why this
> feature was considered useless.
>
> My problem is, I have many hostgroups, used to activate specific checks,
> most notably per-organisational-unit hostgroups (not all services are
> deployed in all OUs), but also per-OS, per-type (server, network
> equipment, etc.). The contacts for those machines are not the same,
> depending on the hostgroup. Specifying a contact_group for the hostgroup
> seems the obvious way to declare this.
>
> If I want to declare such a setup using only host definitions, I can't see
> how to avoid declaring host templates for each combination of
> ou/os/type/whatever: this clearly does not scale.
>
> Is there a clean way to get the equivalent functionality, or should this
> feature simply reintroduced in 2.0 ?
>

Make heavy use of templates. That's what makes nagios scale in the first
place, and consolidating the scaling part to one area makes it easier
for first-time users. It's also cleaner code-wise, because things can be
generalized and doesn't have to have so many exceptions (coders hate
exceptions).

>
> Another related issue, for which I did not find a solution, is how to send
> service notifications to contacts defined on a per-host basis (the admins
> for the machines, presumably located in the same part of the building, or
> in direct contact to the users). Maybe this could be done by adding a new
> notify_host_contacts flag to services (and servicegroups), that would
> cause service notifications to be sent to host contacts, and possibly a
> per-host services_contact_groups, if there is a need for those contacts to
> be different from the host contacts (although I have no use for the latter
> myself at the moment).
>

I've thought about implementing this myself for quite some time,
although I had the idea that contacts should be inherited from the host
if none were set in either the service-template or in the service object
definition itself. Your way is cleaner, since you provide a way to both
inherit and name contactgroups explicitly.

--
Andreas Ericsson [email protected]
OP5 AB www.op5.se
Lead Developer





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