3

I have upgraded my nagios core to 4.0.7 and there are some errors when I log in my nagios web interface.

First, there is an error message on the home page: Unable to get process status.

Second, nagios seem not being able to execute any of it's plugin commands which reflects over the localhost : check_ping command returning the following status information: (No output on stdout) stderr: execvp(/opt/nagios/nagios/libexec/check_ping, ...) failed. errno is 2: No such file or directory.

The problem is obvious here, it tries to execute the plugin commands from a wrong directory. After upgrading, all plugin commands are located in /usr/local/nagios/libexec. How do I tell nagios where to look for default commands?

Thank you.

Andrei Stalbe
  • 1,511
  • 6
  • 26
  • 44

4 Answers4

3

For others who end up here, the solution for me was that the files in /usr/local/nagios/sbin had the wrong permissions. Setting them to 755 solved it.

Steve
  • 1,371
  • 1
  • 16
  • 38
1

inside /etc/nagios there is a resource.cfg file which defines the plugins path inside a $USER1$ variable. Set it to the existing plugins directory, hopefully will work.

Andrei Stalbe
  • 1,511
  • 6
  • 26
  • 44
0

You need to update your commands.cfg to the right paths.

Nagios commands configuration documentation

Noy
  • 1,258
  • 2
  • 11
  • 28
  • This would require to change the `commands.cfg` file for all available commands which is not the right way I think. Found a solution however, will post it as an answer. Thanks – Andrei Stalbe Aug 14 '14 at 12:21
  • 1. The configuration files' existence is to allow platform-specific changes possible. 2. You could always try to symlink the files from the old location to new location, like this: `ln -s /path/to/file /path/to/symlink` – Noy Aug 14 '14 at 12:23
0

I know this is an old thread but for others who might find it, I had the plugins in a folder different than /opt/nagios/libexec/

What fixed it is to copy the plugins from where they were to the folder which Nagios is expecting them to be.

Eg.: cp -RL /usr/local/nagios/libexec/* /opt/nagios/libexec/

Teio
  • 15
  • 5