Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have just freshly installed Nagios on a Fedora 16 box and it doesn't seem to work. I installed nagios and nagios-plugins using yum (after installing Apache, MySQL and PHP) and changed the contact e-mail. I also configured the nagios web GUI password (nagiosadmin) and ran the config verification. Of course I also restarted all the relevant service. However, the web GUI says:

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.

I already verified the configuration (0 errors, 0 warnings). I also read that this could be caused by permission problems, and gave recursive 777 to:

  • /etc/nagios
  • /var/spool/nagios
  • /usr/share/nagios

It still doesn't work. The log has many messages similar to:

[1326273957] Warning: Return code of 127 for check of service 'Root Partition' on host 'localhost' was out of bounds. Make sure the plugin you're trying to run actually exists.

I have checked that the plugins are installed, although there might be another problem with them.

Any suggestions on how I might troubleshoot this?

Thanks.

share|improve this question

2 Answers 2

The error

[1326273957] Warning: Return code of 127 for check of service 'Root Partition' on host 'localhost' was out of bounds. Make sure the plugin you're trying to run actually exists

is from attempting to run a plugin. Do what the message says:

Make sure the plugin you're trying to run actually exists

Secondly, your change of permissions was very, very, very BAD. Do not do this. As it is now, anyone who logs into (or cracks into) your box will have full ability to write into all these directories, and can run things as the nagios user, and can potentially craft bad web pages to hack further into your system or into others. Don't ever set permissions to 777 (except for /tmp, which is actually set to 1777).

Lastly, make sure you have a configuration set up for services, hosts, et al - not just for the server itself. In the Nagios web page, you should be able to see the configuration by clicking on a link to the left (towards the bottom). My guess is that if you do that, there will either be an error or nothing will display.

share|improve this answer

When you're starting nagios, you're using an init.d script? If running "/path/to/nagios -v /path/to/nagios.cfg" says there are no problems, but trying to start it "normally" balks, then the init.d script might be trying to start it in a different way (perhaps wrong config file path?).

A return code of 127 means "file not found". Some packaged nagios installs use a nagios "resource" for the plugin path (like "USER1=/usr/lib/nagios/plugins", and then $USER1$/check_disk for the path), and this might be set incorrectly. If not USER1 or similar, then the path to the plugin is just plain wrong (or the plugin doesn't exist) in the command definition.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.