Is is possible to setup an 'aggregate service'?

Andreas Ericsson ae at op5.se
Wed Jan 19 09:43:31 CET 2005


Jason Dinsdale wrote:
> I have Nagios installed and running just fine, and what a great tool it is 
> too ... kudos to Ethan.  
> 
> I have a Q about whether it is possible to setup what I like to call 
> an 'aggregate' service - a check of the doco gave me nothing. (and leads me to 
> believe that this cannot be done currently?); our company has several business-
> level (or abstract) services that are in fact comprised of multiple host-level 
> services, all of which contribute to this high-level service being 'up' or 
> not.  For example, for this high-level service to be deemed as 'up' by the 
> business, the following all need to be OK:
> 
> - Host A - 3 x processes, and 2 x specific established TCP connections.
> - Host B - 3 x processes, and 2 x specific established TCP connections.
> - Host C - DNS service, 2 x specific processes.
> - Host D - WWW service.
> - Host E - Database up and responding to queries.
> 
> What I'd like to do is setup an 'aggregate service' who's state is dependant 
> on the state of these specific services on hosts A, B, C, D & E so that:
> 

Most likely it is not. Monitoring needs to be in detail so the admins 
get to know where things are failing. If you're talking about creating 
SLA reports from the data you can simply add all the services to a 
servicegroup.

> - If all services on A,B,C,D & E are OK, then the aggregate services is OK.
> - If one of the services on A,B,C,D & E is in a WARNING state, then the 
> aggregate services is also in a WARNING state.
> - As above, but with CRITICAL.
> 
> A further real-world wrinkle to this is that hosts A & B are in a load-
> balanced config, so that if one host is down (CRITICAL) this is not actually a 
> CRITICAL problem for the 'aggregate' service since it can still function using 
> host B, and so it would be more appropriate to give the aggregate service 
> a 'WARNING' condition.   This being the case it would be ideal if there was 
> some way of describing these dependencies.
> 

You want 3 services (one for each loadbalanced server), 
servicedependencies and the check_dummy plugin that always returns 
CRITICAL (for the "master") or WARNING (for the services depending on 
the loadbalanced servers) respectively. You will have to reset the 
WARNING and CRITICAL services that use the check_dummy plugin manually 
(or concoct some eventhandler to use for all the other services).

> So can this be done, or is this really a new feature request?

It can, with some tweaking and warping of the config.

>   Some of you 
> might suggest that I just write a check for all these conditions and use a 
> simple service check, but to me it makes a lot of sense to just leverage the 
> existing service/check infrastructure and associated status info within Nagios.
> Unfortunately I'm not much of a developer (not at this level anyway) so it's 
> beyond me to write a mod to Nagios itself... :(
> 

Pick up K&R's "The C programming language" to remedy that.

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Lead Developer


-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
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