[icinga-users] Icinga Configuration Check - Passive Service
zachary.mcgibbon at gmail.com
Tue Mar 26 14:41:47 CET 2013
I'm not sure if anyone else is doing this but I thought I'd share a
neat little trick I did. Our Icinga setup is quite large, 7300+ hosts
and 16000 services and they mostly all come from an Oracle database.
We run scripts that pulls the data every 4 hours and reloads Icinga
automatically. Of course, there are often inconsistencies (mostly
child/parent relationships) so we need to know when something is
broken. Since I get over 100+ emails from Icinga per day, I
automatically put them in a folder that I don't look at very often, so
even when my script runs every 4 hours, these failure emails go into
this folder too.
To remedy this situation, I created a passive service for my Icinga
host called 'Icinga Config'. When my script runs to update my config,
at the end it checks if there were any errors and then sends a passive
check to this service. Since I run Nagstamon on my desktop, I see the
alert right away when it breaks.
service_description Icinga Config
Then my shell script that runs every 4 hours (just the last part):
# Event handler to submit check results
# Set ICINGACHK
if [ -f $ICINGACHK ]; then
$EVENTHANDLER etna "Icinga Config" 2 "CRITICAL - Please Verify
$EVENTHANDLER etna "Icinga Config" 0 "OK - Icinga Config is Good"
More information about the icinga-users