Nagios plugin error: (No output to stdout) ... failed. errno is 2: No such file or directory

I am using Nagios custom plugins for the first time and am executing this error when creating a service for a plugin.

(No output on stdout) stderr: execvp(/usr/local/nagios/libexec/check_load.py, ...) failed. errno is 2: No such file or directory

The plugin works when I run it on the command line, however it does not work when it starts in Nagios.

I followed the steps to get the plugin in Nagios https://assets.nagios.com/downloads/nagiosxi/docs/Managing-Plugins-in-Nagios-XI.pdf

Here's what it looks like in the Nagios user interface

The plugin is in the correct path: / usr / local / nagios / libexec, and the resource.cfg file has the same path inside it.

I tried two separate plugins, both of which work on the command line, and the result with the same error.

The error indicates that the file location is incorrect, but the plugin is located in the specified directory and works without errors in this directory.

I am completely in shock and appreciate any help.

+4
source share
1 answer

For those who read this, I solved the problem.

The first time I added the plugin, I forgot to add the python extension. When I update an already created plugin, Nagios still throws an error.

As soon as I completely removed the plugin and recreated it, "file not found", the error disappeared.

+4
source

All Articles