Failed to obtain lock on file /var/run/nagios.pid: Permission denied
Problem: Unable to start nagios
tail -f /var/log/nagios/nagios.log
[1365771897] Nagios 3.2.3 starting… (PID=27897)
[1365771897] Local time is Fri Apr 12 18:04:57 PKT 2013
[1365771897] LOG VERSION: 2.0
[1365771897] Failed to obtain lock on file /var/run/nagios.pid: Permission denied
[1365771897] Bailing out due to errors encountered while attempting to daemonize… (PID=27897)
Solution:
mkdir /var/run/nagioschown nagios:nagios /var/run/nagios
vi /etc/nagios/nagios.cfg
lock_file=/var/run/nagios/nagios.pid
/etc/init.d/nagios start
nagios is stopped
Starting nagios: [ OK ]