Thoughts / request for feedback on extending servicegroup syntax to support host group -> services associated with a second hostgroup syntax

Max perldork at webwizarddesign.com
Thu Aug 13 05:45:19 CEST 2009


* We make extensive use of service -> hostgroup -> host mappings.
* We use this for sets of services that are used by multiple
'customers' within our Nagios instance (not paying customers, more
like project teams)

So this leads to a growing number of requests where our users want to
have service groups to be able to control services associated with
hostgroups but bounded by their local host groups.

For example, we might have:
* Net-SNMP hostgroup (net_snmp_hosts)
* Net-SNMP services
* Web server operational host group (web-server-ops) containing all
web server hosts

This group would want to be able to have a service group control for
their hosts (web-server-ops) for the Net-SNMP services.

Currently we have to do multiple members host/service_regex lists to
do this, e.g.

members www1.example.com,Net-SNMP.*
members www2.example.com,Net-SNMP.*
members www2.example.com,Net-SNMP.*

So this means that:
1)  We have to attempt to redo the hostgroup -> service mappings
through regular expressions, which will work because we use consistent
naming conventions for services associated with a hostgroup, but puts
the burden on the user to update their files (or us) to keep in sync
with host group -> service mappings, which will certainly lead to
things getting out of sync
2)  The user has to explicitly enumerate hosts when in 99% of our
cases the user already has the hosts that have the services in a
specific group, so again having to redo mappings that already exist.

What would be ideal would be for the service groups to be either:
* A tuple of host_group and service regex

OR, better

* A tuple of host_group and host_group where the second host group
implies "all services associated with this host group"

e.g.

define servicegroup {
   alias Net-SNMP services on Web hosts
   servicegroup_name web_server_net_snmp
   members web-server-ops,net_snmp_hosts
}

Bam .. then any new services or hosts get added at start up time and
the user has a very easy way to control specific groups of services
bounded by their host groups with the control panel the CGI provides
for service groups.

i realize this is not a trivial thing to implement, so I am asking for
feedback on
1) If others would find this useful
2) If so, what would be a preferred syntax to implement this?
  * Override the current functionality so that if a LHS or RHS of a
members tuple doesn't match a host or service, host groups are
assumed?
  * Add a new member that is optional to the servicegroup object for
this functionality

Most likely we will implement this internally as we will have lots of
our users wanting it, so if people have desire for this we would
certainly prefer to do it using a syntax and style that others would
care about so we could contribute the functionality back to the
community once it is stable and tested.

- Max

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list