I’ve installed Nagios version 3.0.6 via Yasts, installation is successful but when I tried to browsed to the sub menu under http://nagios-server/nagios
I keep getting this ‘Error:Could not read object configuration data!’
I’ve also verify the configuration using -v command-line option, as shown below no error is found.
Checking services…
Checked 8 services.
Checking hosts…
Checked 1 hosts.
Checking host groups…
Checked 1 host groups.
Checking service groups…
Checked 0 service groups.
Checking contacts…
Checked 1 contacts.
Checking contact groups…
Checked 1 contact groups.
Checking service escalations…
Checked 0 service escalations.
Checking service dependencies…
Checked 0 service dependencies.
Checking host escalations…
Checked 0 host escalations.
Checking host dependencies…
Checked 0 host dependencies.
Checking commands…
Checked 24 commands.
Checking time periods…
Checked 5 time periods.
Checking for circular paths between hosts…
Checking for circular host and service dependencies…
Checking global event handlers…
Checking obsessive compulsive processor commands…
Checking misc settings…
Total Warnings: 0
Total Errors: 0
Things look okay - No serious problems were detected during the pre-flight check
The nagios.log file below do show error
sles11sp2:/etc/nagios # tail /var/log/nagios/nagios.log
[1342287481] Error: Unable to create temp file for writing status data!
[1342287491] Error: Unable to create temp file for writing status data!
[1342287501] Error: Unable to create temp file for writing status data!
[1342287511] Error: Unable to create temp file for writing status data!
[1342287521] Error: Unable to create temp file for writing status data!
[1342287531] Error: Unable to create temp file for writing status data!
[1342287541] Error: Unable to create temp file for writing status data!
[1342287551] Error: Unable to create temp file for writing status data!
[1342287561] Error: Unable to create temp file for writing status data!
[1342287571] Error: Unable to create temp file for writing status data!
concerning the errors from nagios.log: The Nagios executables invoked via the web server run in the web server’s context - so you might need to give wwwrun the proper permissions to the “temp file directory”. Being unable to write some intermediate status data may very well be the root cause… otoh, maybe the permissions to read the configuration files are too restrictive, too. I’m sure you invoked pre-flight checks from the root user context
I’m not sure which “temp file directory” to give the permission to? Yes, I invoked the checks using the root account, however the user account needed to login to the web interface were created via htpasswd2 -c /etc/nagios/htpasswd.users nagiosadmin
and another user nagios was created automatically during installation of nagios in passwd nagios:x:108:113:User for Nagios:/var/lib/nagios:/bin/false
I’m not sure which “temp file directory” to give the permission to? Yes, I invoked the checks using the root account, however the user account needed to login to the web interface were created via htpasswd2 -c /etc/nagios/htpasswd.users nagiosadmin
and another user nagios was created automatically during installation of nagios in passwd nagios:x:108:113:User for Nagios:/var/lib/nagios:/bin/false[/QUOTE]
I doubt that your Nagios is installed in /usr/local, but probably /opt/nagios. That’s where I’d search for the directories that are giving problems. OTOH, the installer should have set up those permissions already.
Anything else in the Apache error logs that may be helpful?
The “web users” that you create via htpasswd2 have nothing to do with actual system accounts used to access ie the file system - it’s either the context of httpd (user “wwwrun”) or, in case of setuid CGI programs, the user owning those specific binaries.
On 07/02/2014 06:14 AM, sbuinosquy wrote:[color=blue]
Hi kent, i have the same issue with the default nagios installation in
sles11… try chmoding 777 the /var/lib/nagios[/color]
Besides being a two-year-old thread, chmod-ing to 777 seems a bit
excessive. Is there any reason you’d add execute on anything in or
read/write/execute for other (non-user/group-owner) users?
–
Good luck.
If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below…