I reinstalled a low power Via C3 machine to monitor my network, now almost 90% of my machines run on ESXi… Sure I didn’t want to monitor a virtual host from one of the virtual guest it runs… when the host goes down, what good will do monitoring from within?
The machine was installed using Ubuntu Server x86 9.10, the most recent stable one, and after basic installation, fixing the IP, setting a hostname and apt-get update, apt-get upgrade and apt-get dist-upgrade, I installed nagios3 and all its extras from aptitude.
Configuration was quite easy, I just had to take over the config I already had running on an older box which will be shut down later this week to save energy (it’s an old power-hungry Pentium 4 machine with too many single-disk storage blocks). After logging in, I noticed a lot of the services were ‘muted’… Notification was disabled on all HTTP checks etc…
When trying to enable the notification for a service check on one of the machines, I got the error Error: Could not stat() command file '/var/lib/nagios3/rw/nagios.cmd'!
I checked the rights on the file, owner and group ownership, but nothing wrong was to be seen there.
Googling around, I stumbled upon a short post on Yes! That Works Fine! and tried the 4 command lines.
I had to change it a bit so the original code:
stop nagios2
/etc/nagios2# dpkg-statoverride --update --add nagios www-data 2710 /var/lib/nagios2/rw
/etc/nagios2# dpkg-statoverride --update --add nagios nagios 751 /var/lib/nagios2
start nagios2
became:
/etc/init.d/nagios3 stop
/etc/nagios3# dpkg-statoverride --update --add nagios www-data 2710 /var/lib/nagios3/rw
/etc/nagios3# dpkg-statoverride --update --add nagios nagios 751 /var/lib/nagios3
/etc/init.d/nagios3 start
After retrying to enable the notification for the HTTP check that caused the message above, it worked without any error, and the notification is working again.
[...] The machine was installed using Ubuntu Server x86 9.10, the most recent stable one, and after basic installation, fixing the IP, setting a hostname and apt-get update, apt-get upgrade and apt-get dist-upgrade, I installed nagios3 and all its extras from aptitude. More here [...]
[...] The machine was installed using Ubuntu Server x86 9.10, the most recent stable one, and after basic installation, fixing the IP, setting a hostname and apt-get update, apt-get upgrade and apt-get dist-upgrade, I installed nagios3 and all its extras from aptitude. More here [...]