[ Return To FAQ Index | Search The FAQs ]
|Title:||Error: Could not read object configuration data!|
|Submitted By:||Todd Edmands |
|Description:||When clicking on any of the links on the left hand side you get: Error: Could not read object configuration data! Here are some things you should check in order to resolve this error:
1. Verify configuration options using the -v command-line option to check for errors.
2. Check the Nagios log file for messages relating to startup or status data errors.
3. 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 http://www.nagios.org. |
|Solution:||All suggestion on the error page were checked and showed no problems. The problem in my case was caused by suexec on my CentOS system preventing apache from reading nagios files.
Check your /var/log/messages files and look for SELinux errors.
For example in my messages file I found errors like the following;
Sep 9 12:37:53 monitorhost setroubleshoot: SELinux is preventing the status.cgi from using potentially mislabeled files ./objects.cache (var_t). For complete SELinux messages. run sealert -l 6bd07ca6-a7e7-4cb1-a1c2-cfddcfdc94bb
Check the settings on the apache directory.
[monitorhost log]# stat -Z -c %C /var/www/html system_u:object_r:httpd_sys_content_t
Set the same permissions for the nagios resources using the chcon command on the resources noted in errors listed in the messages file.
# chcon -R -u system_u -r object_r -t httpd_sys_content_t /var/nagios/
|Keywords:||Whoops Object Configuration data selinux |