Nagios Aggregator
*Download*
A PHP script for aggregating multiple Nagios instances into one consistent view.
Features:
- Aggregation of multiple views
- acknowledging known alerts
- localization support (EN, PL)
- AJAX based
- ...
Required software:
- database backend - currently PostgreSQL, tested with version 8.2.5-1
- web server with php support - in my case Apache 2.2, but it shouldn't matter
- tidy - for html to xml conversion
- cron - or other software to periodically run the fetcher script
Installation and configuration
As a prerequisites you need to install postgreSQL and apache, or other web server. Enable PHP support in the Web server and create a database in postgreSQL. Its name is configurable in Aggregator so choose whichever you like.
Unpack the sources into a specific dir, visible in the Web server's document root and reconfigure database settings in the following files:
- SettingsDB.php
- filter.php
Note: I had a problem when adding DB support with php includes and variable visibility - that is why there are two places to modify, hopefully will correct it in future versions.
Edit file config, which is used by fetcher.sh to get all the needed nagios views. The file format looks like this:
nagios_version#nagios_name#address
The meaning of those fields is as follows:
- nagios_version - obsolete now, but used by previous versions of Agregator, don't care about that, enter some random stuff
- nagios_name - name displayed in aggregation for all those alerts from a specific Nagios instance
- addres - an URL to the Services page of Nagios, you can also put here Alerts page.
The line could look like this:
2#nagios-services#https://localhost/cgi-bin/nagios2/status.cgi?host=all
Comments are accepted. With hash sign.
The final step of the configuration is to add execution of fetcher.sh into cron.
Good luck!
Screenshots