Nagios hints for Ubuntu/Debian (updated for nagios3)

Some Nagios hints:

1. To get nagios2 and all plugins not moved to nagios2-* packages, do this:

sudo apt-get remove nagios nagios-common
sudo apt-get install nagios-plugins-basic nagios-plugins-standard \
  nagios2 nagios2-common nagios2-doc

2. To enable external commands, these steps are necessary:

Edit /etc/nagios2/nagios.cfg and set check_external_commands to 1, i.e.:

Then you have to repair some file access modes, Thanks to gmcf for these lines:

sudo /etc/init.d/nagios2 stop
sudo dpkg-statoverride --update --add nagios www-data 2710 /var/lib/nagios2/rw
sudo dpkg-statoverride --update --add nagios nagios 751 /var/lib/nagios2
sudo /etc/init.d/nagios2 start

For nagios3:

/etc/init.d/nagios3 stop
dpkg-statoverride --update --add nagios www-data 2710 /var/lib/nagios3/rw
dpkg-statoverride --update --add nagios nagios 751 /var/lib/nagios3
/etc/init.d/nagios3 start


From: IBCL BLog.
Originally posted: 2008-05-02