First things first, check the process
# /etc/init.d/nagios status
nagios is stopped
Not running? Odd. ok, start it up
# /etc/init.d/nagios start
nagios is stopped
Configuration validation failed [FAILED]
Hmm.
# /usr/bin/nagios -v /etc/nagios/nagios.cfg
Checking...
Total Warnings: 0
Total Errors: 0
Things look okay - No serious problems were detected during the pre-flight check
So, I checked the log files and they are all from past dates, including nothing from the last day or so.
# cat /var/log/nagios/nagios.log | perl -pe 's/(\d+)/localtime($1)/e' | less
Nifty perl script there to fix the dates, but it's not mine, just a web snippet.
I was stumped. Then I had a thought, SELinux errors...
# getenforce
Enforcing
Ok,
# setenforce permissive
and give it another shot,
# /etc/init.d/nagios start
nagios is stopped
Starting nagios: [ OK ]
As they say on Afrotechmods,
A lot of folks disable SELinux in their environments as it can get rather complicated. However, for this issue I was able to dig up this post regarding setting up a new type definition for Nagios, but haven't yet tried it myself.
http://fportase.wordpress.com/selinux-policies/nagios-and-rhel-5-xx-and-6-xx-working-with-selinux-enabled/
No comments:
Post a Comment