Nagios2JSON

Thomas Guyot-Sionnest thomas at zango.com
Fri Jun 13 18:01:20 CEST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Yann JOUANIN wrote:
| I could get it works as an event broker, but where to send data?

To single file... Or a set of files if you think it makes more sense. As
I said your CGIs can just get the file with an http request (just like
you do with the original CGI..

Be sure to write a new file and move it over, to make sure writes are
atomic.

| I thought about two things :
|
| _ A cgi file to export data in JSON format, for all data which don't
need realtime (such as hosts list ...).
| _ A event broker to send data to another server (the frontend) on
event by using for example JSON-RPC (www.json-rpc.org).
|
| This will permit realtime update for alarms etc, and to send data
every N minutes to frontend server.
|
| I am using several Nagios servers and I generate JSON data every 5
mins in local and push them through ssh to the frontend server where I
aggregate data.

If using an event broker you will likely do the job every
status_update_interval. The event broker would be the one writing the
JSON status file, and a scheduled job would send the file (or the file
content using JSON-RPC) to remote servers.

Then to go one step further, we could write a replacement status data
I/O (USE_XSDDEFAULT) for Nagios that write _and_ read status data in
JSON format. That would make the CGI use this function as well,
effectively making the status_file in JSON format. Once this step is
done any replacement CGI can be plugged in directly, reading status data
in JSON format.

- --
Thomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIUpnQ6dZ+Kt5BchYRAsSOAJ9M9yxAgMLE7k/9mV5S1Tn/WUQHZQCeI2fa
NPQqneaKGb/G4vey+Af+Iy8=
=9J5m
-----END PGP SIGNATURE-----

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php




More information about the Developers mailing list