We have Nagios configured to do some simple monitoring of our services and machines. It runs on monitor.

Updating configuration

If you're just updating a bit of configuration because dependencies or IPs have changed, this is probably all you need:

ssh monitor
ksu -l
cd /etc/nagios3/conf.d/
# Edit any relevant monitoring exceptions:
edit hosts.input
# Generate the config:
/afs/club/system/scripts/perl/make-nagios-hosts.pl -l what_xen.login hosts.input > hosts.cfg.new
diff -U3 hosts.cfg{,.new}
# Give it a good hard look, because sometimes weird things jump out.
# When you're satisfied, swap the old for the new:
mv hosts.cfg{,.old}
mv hosts.cfg{.new,}
# Run a pre-flight check:
nagios3 -v /etc/nagios3/nagios.cfg
# If no errors or warnings, restart the daemon:
/etc/init.d/nagios3 restart

Then go be happy.

Details on rebuild

The last rebuild, in 2011-05, started with a new squeeze VM.

Install the following packages

Configuration steps

Software

This section and everything below it is old. Be wary!

We're currently running the following on monitor:

Club Specialness

Hack /etc/nagios2/apache2.conf appropriately.

This mostly involves doing Pubcookie (WebISO) authentication.

Do the magicness for external commands described in /usr/share/nagios2/README.debian.

Divert the files debian installs into /etc/nagios2/conf.d out of the way (e.g. from xxx.cfg to xxx.cfg.debian), and then delete them (the diversion is so upgrades don't put them back with names Nagios will notice).

Configuration

The configuration lives in subversion...

I should in the future explain how the configuration works.

stroucki's config hacks

As requested at 小亚洲 on 2015-05-23:- removing a host from nagios: remove the host stanza from hosts.cfg, and anywhere else it may appear (like hostgroup definitions etc). For cclub secret sauce, remove any entry in hosts.info. /etc/init.d/nagios3 reload will check for syntax errors before reloading configuration for a running nagios

nagircbot

Runs out of /etc/rc.local. It is configured via command line arguments.


CategoryServices CategoryClubServices

Services/Club Nagios (last edited 2023-08-26 23:28:26 by kbare@CLUB.CC.CMU.EDU)