Is is possible to setup an 'aggregate service'?

Harper Mann hmann at itgroundwork.com
Wed Jan 19 07:30:16 CET 2005


I wonder if check_cluster2 from the nagios-plugins contrib directory would
work for you.  It checks a list of services / hosts and alarms if X are in
alarm:

[hmann at milano contrib]$ ./check_cluster2 --help
./check_cluster2: unrecognized option `--help'
Invalid arguments supplied

Host/Service Cluster Plugin for Nagios 2
Copyright (c) 2000-2004 Ethan Galstad (nagios at nagios.org)
Last Modified: 03-11-2004
License: GPL

Usage: ./check_cluster2 (-s | -h) [-l label] [-w threshold] [-c threshold]
[-d val1,val2,...,valn]

Options:
   -s, --service  = Check service cluster status
   -h, --host     = Check host cluster status
   -l, --label    = Optional prepended text output (i.e. "Host cluster")
   -w, --warning  = Specifies the number of hosts or services in cluster
that must be in
                    a non-OK state in order to return a WARNING status level
   -c, --critical = Specifies the number of hosts or services in cluster
that must be in
                    a non-OK state in order to return a CRITICAL status
level
   -d, --data     = The status codes of the hosts or services in the
cluster, separated
                    by commas

Hope that works!

- Harper

Harper Mann
Groundwork Open Source Solutions
510-599-2075 (cell)
http://itgroundwork.com


-----Original Message-----
From: nagios-users-admin at lists.sourceforge.net
[mailto:nagios-users-admin at lists.sourceforge.net] On Behalf Of James
Sent: Tuesday, January 18, 2005 8:07 PM
To: nagios-users at lists.sourceforge.net
Subject: Re: [Nagios-users] Is is possible to setup an 'aggregate service'?

Most, if not all, of your requests can be done using event handlers.
Basically,
in an existing service or host definition, you use the 'event_handler'
directive
to execute a script if a service or host is up/down/critical, etc.  If one
of
the services on a host goes down, that script could simply be setup to email
(using Nagios utilities if you wish) or page with a predefined message
stating
'High Level Service problem - Service X on Host B down' or whatever...

Check out the redundant monitoring section of the docs for more info on
event
handlers...

James

Quoting Jason Dinsdale <jasondinsdale at gmail.com>:

>
> 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:
>
> - 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.
>
> So can this be done, or is this really a new feature request?   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... :(
>
> Thanks,
>
> Jason
>
>
>
> -------------------------------------------------------
> 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
>




----------------------------------------------------
This mail sent through jkm.NET secure webmail server


-------------------------------------------------------
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




-------------------------------------------------------
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