Nagios: Could not read object configuration data!

If you are using Debian lenny/sid and Nagios complains after apt-get install nagios3 with the message: “Error: Could not read object configuration data!” than one solution could be to add the user www-data to the group www-data.

Command:

adduser www-data www-data

Don’t forget to reload the apache process.

For some strange reason this user was not in his default group and so the CGI could not read the file /var/cache/nagios3/objects.cache which is only accessible for user nagios and group www-data.

I came across this with strace, following one of the apaches PIDs and reloading the page until the round-robin activated my process and there was some output which I grepped for nagios.