Reading state of a contactgroup?
Andreas Ericsson
ae at op5.se
Thu Sep 8 14:01:25 CEST 2005
Morten Guldager wrote:
> On 9/8/05, Andreas Ericsson <ae at op5.se> wrote:
>
>>Morten Guldager wrote:
>>
>>>On 9/8/05, Sébastien Barbereau <barbereau at gmail.com> wrote:
>>>
>>>
>>>>I think you should have a look at the "status_file" variable from your main
>>>>configuration file ...
>>>
>>>
>>>As far as I can tell the status_file only contains information on
>>>hosts and services. I need something "collected".
>>>My 3 contactgroup's contains multiple objects each, I need only one
>>>traffic light for each contactgroup, telling something about the
>>>"worst" condition in that particular group.
>>>
>>
>>Assuming the contacts in those different contactgroups are only contacts
>>for the hosts they manage, the current Nagios gui will do this for you
>>(but in greater detail) on the tactical overview, so why fiddle with
>>extra scripts?
>
>
> My "traffic lights" are not webbased. We are talking real analog hardware here.
> I know how to manipulate that part, I just cant figure out where to
> get the information from nagios.
>
> My current "best idea", (which sucks!), is to make a contact with a
> notification which logs events to a file. Then a daemon listens to
> this file and inserts changes to a database. "OK" states removes from
> the database.
> Then its a simple select to figure out the collective status for a contactgroup.
>
This is not a bad idea at all, but why use a daemon to listen to a file
when it can just as well listen to a socket or a pipe? Have the daemon
either run some program to set the lights or do it itself. Borrowing the
code from Nagios to parse the objects.cache file should be a no-brainer.
Or better yet, write a NEB-module to handle it. That way you get access
to the Nagios configuration when it's already parsed and all should be well.
--
Andreas Ericsson andreas.ericsson at op5.se
OP5 AB www.op5.se
Lead Developer
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
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