I run a large Nagios setup, currently running one master server and around 10 slaves in a distributed monitoring setup.
The problem is when you setup your check on the slave for active monitoring you need to do the some on the master for passive monitoring, it takes ages.
So I wrote a single live stripper which changes the field to a passive format which change then be cut-n-pasted into the master. The one thing I put in as an extra is the parent relationships.
1 |
sudo cat /etc/nagios3/conf.d/hostfile.cfg | sed '/^ check/d'| sed 's/ use generic-service/ use passive-service\n check_command dummy_check/' | sed 's/generic/passive/' |