Each of the pages on the web interface returns this:
[blockquote]
Whoops!
Error: Could not read object configuration data!
Here are some things you should check in order to resolve this error:
- Verify configuration options using the -v command-line option to check for errors.
- Check the Nagios log file for messages relating to startup or status data errors.
- Make sure you’ve compiled the main program and the CGIs to use the same object data storage options (i.e. default text file or template-based file).
Make sure you read the documentation on installing, configuring and running Nagios thoroughly before continuing. If all else fails, try sending a message to one of the mailing lists. More information can be found at nagios.or
[/blockquote]
here is my command output
[root@localhost /etc/nagios]$ ps -ef|grep nagios
nagios 4207 1 0 11:35 ? 00:00:00 /usr/bin/nagios -d /etc/nagios/nagios.cfg
nagios 4846 1 0 11:44 ? 00:00:00 /usr/bin/nagios -d /etc/nagios/nagios.cfg
nagios 4847 4846 0 11:44 ? 00:00:00 /usr/lib/nagios/plugins/check_ping -H development.ivestserve.com -w 100.0,20% -c 500.0,60% -p 5
nagios 4848 4847 0 11:44 ? 00:00:00 /bin/ping -n -U -w 10 -c 5 development.ivestserve.com
root 4850 5367 0 11:44 pts/10 00:00:00 grep nagios
[root@localhost /etc/nagios]$/etc/init.d/nagios stop
Stopping network monitor: nagios
[root@localhost /etc/nagios]$ ps -ef|grep nagios
nagios 4889 1 0 11:44 ? 00:00:00 /usr/bin/nagios -d /etc/nagios/nagios.cfg
nagios 4890 4889 0 11:44 ? 00:00:00 /usr/lib/nagios/plugins/check_ping -H marina.ivestserve.com -w 100.0,20% -c 500.0,60% -p 5
nagios 4891 4890 0 11:44 ? 00:00:00 /bin/ping -n -U -w 10 -c 5 marina.ivestserve.com
root 4898 5367 0 11:44 pts/10 00:00:00 grep nagios
[root@localhost /etc/nagios]$ ps -ef|grep nagios
root 4911 5367 0 11:44 pts/10 00:00:00 grep nagios
[root@localhost /etc/nagios]$/etc/init.d/nagios start
Starting network monitor: nagios
PID TTY TIME CMD
4953 ? 00:00:00 nagios
[root@localhost /etc/nagios]$ ps -ef|grep nagios
nagios 4953 1 0 11:45 ? 00:00:00 /usr/bin/nagios -d /etc/nagios/nagios.cfg
nagios 4972 1 0 11:45 ? 00:00:00 /usr/bin/nagios -d /etc/nagios/nagios.cfg
nagios 4973 4972 0 11:45 ? 00:00:00 /usr/lib/nagios/plugins/check_ping -H 192.168.21.111 -w 100.0,20% -c 500.0,60% -p 5
nagios 4974 4973 0 11:45 ? 00:00:00 /bin/ping -n -U -w 10 -c 5 192.168.21.111
root 4976 5367 0 11:45 pts/10 00:00:00 grep nagios
[root@localhost /etc/nagios]$/etc/init.d/nagios stop
Stopping network monitor: nagios
[root@localhost /etc/nagios]$ ps -ef|grep nagios
root 5131 5367 0 11:47 pts/10 00:00:00 grep nagios
[root@localhost /etc/nagios]$nagios -d /etc/nagios/nagios.cfg
[root@localhost /etc/nagios]$ ps -ef|grep nagios
root 5141 5367 0 11:47 pts/10 00:00:00 grep nagios
here is my log file output
[1116258314] Nagios 2.0b2 starting... (PID=4952)
[1116258314] LOG VERSION: 2.0
[1116258314] Finished daemonizing... (New PID=4953)
[1116258443] Caught SIGTERM, shutting down...
[1116258443] Successfully shutdown... (PID=4953)
[1116258475] Nagios 2.0b2 starting... (PID=5139)
[1116258475] LOG VERSION: 2.0
[1116258475] You do not have permission to write to /var/run/nagios/nagios.pid
[1116258475] Bailing out due to errors encountered while attempting to daemonize... (PID=5139)
What is wrong here and why doesn’t nagios have permissions to write to nagios.pid?
Sounds like you installed a RPM package, so blame it on that. Installing from source, the directories would have been given the correct permission’s. So just correct the permission’s by hand.
I heard you mention selinux in another thread. You might want to do a search for that, in this forum. Many others have had trouble with it, not allowing them to view the cgi’s.
what should the permissions be on the directories?
edit: nevermind, it is an selinux thing
I rebooted with the kernel param selinux=0 and it all works correctly now!
Thanks for the help
Edited Mon May 16 2005, 10:31AM ]
I have no nagios.pid on my system. I do have a nagios.lock file in /usr/local/nagios/var/ and the permissions on that directory are 775 and nagios.nagios for owner.group
The lock file is defined in nagios.cfg and shows the name of the lock file and the directory location of that lock file. So yours may be defined differently than mine (I know, that’s obvious, hehe)