Stuck with, NRPE No Output Returned From Plugin? We can help you.
With NRPE, we can remotely execute Nagios plugins on remote Linux/Unix machines.
In addition, it can communicate with a few Windows agent addons. Hence we can execute scripts and check metrics on remote Windows machines as well.
As part of our Server Management Services, we assist our customers with several Nagios queries.
Today, let us see how to fix the error NRPE: No Output Returned From Plugin.
NRPE No Output Returned From Plugin
The major causes of this error include:
- Incorrect permissions
- Missing plugin
- Mismatch of Arguments between Nagios XI and nrpe.cfg
How to solve this?
Moving ahead, our Support Techs provide solutions to each cause.
-
Incorrect permissions
A common solution is to check the permissions on the check_nrpe binary on the Nagios XI server:
ls -la /usr/local/nagios/libexec/check_nrpe
The permissions should resemble:
-rwxrwxr-x. 1 nagios nagios 75444 Nov 21 01:38 check_nrpe
If not, we change ownership to user/group “nagios” and fix up the permissions:
chown nagios:nagios /usr/local/nagios/libexec/check_nrpe
chmod u+rwx /usr/local/nagios/libexec/check_nrpe
chmod u+rx /usr/local/nagios/libexec/check_nrpe
-
Missing Plugin
In the case of a missing plugin file, in order to receive this error, we usually have to experience a secondary configuration issue.
This occurs when the plugin referenced by the command directive in nrpe.cfg is either missing from the libexec folder or an incorrect command directive name.
This also implies that the command name passed through NRPE from the Nagios XI server does not define in the nrpe.cfg file on the remote host.
In order to troubleshoot, we need the name of the command we request NRPE to execute.
For instance, ensure the command is defined in nrpe.cfg on our remote host:
command[check_foo]=/usr/local/nagios/libexec/check_foo.sh $ARG1$
Then, verify if the spelling of check_foo in $ARG1$ matches that of the command directive name command[check_foo].
Next, ensure the plugin to execute on the remote host actually exists.
For example, here, the name of the plugin is:
/usr/local/nagios/libexec/check_foo.sh
We execute the following command on the remote host to see if it exists:
ls -la /usr/local/nagios/libexec/check_foo.sh
If it does not exist, then our output will be like this:
ls: cannot access /usr/local/nagios/libexec/check_foo.sh: No such file or directory
If this is the problem, we have to copy the plugin to the /usr/local/nagios/libexec/ folder.
We ensure the filename check_foo.sh has the correct file extension.
-
Mismatch of Arguments between Nagios XI and nrpe.cfg
Usually, a secondary issue is an argument usage mismatch between the remote host’s nrpe.cfg command directive and the arguments passed by Nagios XI through check_nrpe.
If we pass arguments, the argument usage should be consistent between the Nagios XI service check and the arguments declared in the command directive in the remote host’s nrpe.cfg.
Additionally, check the remote host’s nrpe.cfg for the dont_blame_nrpe directive.
For example, consider this command executed on the Nagios XI server:
/usr/local/nagios/libexec/check_nrpe -H 10.25.13.30 -t 30 -c check_users -a ‘-w 5 -c 10’
To identify the setting NRPE server has defined, we log into the remote host as the root user and execute:
grep -e ^dont /usr/local/nagios/etc/nrpe.cfg
The expected output will be like this:
dont_blame_nrpe=1
[Need help with the resolution? We’d be happy to assist]
Conclusion
In short, there are multiple reasons that may lead us to this error. However, we saw effective solutions to each of them.
0 Comments