{"id":6360,"date":"2021-05-06T10:36:17","date_gmt":"2021-05-06T05:06:17","guid":{"rendered":"https:\/\/www.skynats.com\/?p=6360"},"modified":"2024-12-17T12:23:57","modified_gmt":"2024-12-17T06:53:57","slug":"nrpe","status":"publish","type":"post","link":"https:\/\/www.skynats.com\/blog\/nrpe\/","title":{"rendered":"NRPE &#8211; How to fix No Output Returned From Plugin"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">The NRPE now you can execute Nagios plugins remotely on the Linux\/Unix remote machine. In addition to this, you can also communicate with a few windows agent addons in order to executive scripts and check metrics on remote Windows machines.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Our technical team support will fix any sort of Nagios queries under our&nbsp;<a href=\"https:\/\/www.skynats.com\/linux-server-management\/\" target=\"_blank\" rel=\"noreferrer noopener\"><span style=\"color:#05709e\" class=\"has-inline-color\">server management<\/span><\/a> plan. You can also take assistance from our technical team support 24\/7 for fixing the error or any sort of installation and migration.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">NRPE: No Output Returned From Plugin<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">causes of the error.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The error is due to incorrect permissions<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Due to the missing plugin<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Mismatch of Arguments between Nagios XI and nrpe.cfg<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Resolving the error.<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Incorrect permissions<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The solution to permissions on the check_nrpe binary on the Nagios XI server:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ls -la \/usr\/local\/nagios\/libexec\/check_nrpe<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The permissions should resemble:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>-rwxrwxr-x. 1 nagios nagios 75444 Nov 21 01:38 check_nrpe<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If not, change ownership to user\/group \u201cnagios\u201d and fix up the permissions:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>chown nagios:nagios \/usr\/local\/nagios\/libexec\/check_nrpe\nchmod u+rwx \/usr\/local\/nagios\/libexec\/check_nrpe\nchmod u+rx \/usr\/local\/nagios\/libexec\/check_nrpe<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Missing Plugin<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In case of plugin file missing that leads to the error, will experience a secondary configuration issue.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This used to occur when the plugins referenced by command directive in nrpe.cfg is either missing from the libexec folder or an incorrect command directive name.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It won&#8217;t define the nrpe.cfg file on the remote host while passing through the NRPE from the Nagios XI server.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To troubleshoot the error you need the name of the command then request the NRPE to execute.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For instance, ensure that the remote host has defined the command nrpe.cfg :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>command&#91;check_foo]=\/usr\/local\/nagios\/libexec\/check_foo.sh $ARG1$<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Later, verify if the spelling of check_foo in $ARG1$ matches that of the command directive name command[check_foo].<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Try to ensure the plugins execute on the remote host.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example name of the plugins.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/usr\/local\/nagios\/libexec\/check_foo.sh<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Executive the following commands on the remote host.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ls -la \/usr\/local\/nagios\/libexec\/check_foo.sh<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If it does not exist, then the output will be&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">ls: cannot access \/usr\/local\/nagios\/libexec\/check_foo.sh: No such file or directory<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If this is the problem, we have to copy the plugin to the \/usr\/local\/nagios\/libexec\/ folder.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Ensure the filename check_foo.sh has the correct file extension.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Mismatch of Arguments between Nagios XI and nrpe.cfg<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Usually, a secondary issue is an argument usage mismatch between the remote host\u2019s nrpe.cfg command directive and the arguments passed by Nagios XI through check_nrpe.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Once you pass the arguments its usage should be consistent between the Nagios XI service check the declared arguments in the command directive in the remote host&#8217;s nrpe.cfg.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Additionally, check the remote host\u2019s nrpe.cfg for the dont_blame_nrpe directive.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example, consider this command executed on the Nagios XI server:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/usr\/local\/nagios\/libexec\/check_nrpe -H 10.25.13.30 -t 30 -c check_users -a \u2018-w 5 -c 10\u2019<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To identify the setting NRPE server has defined, we log into the remote host as the root user and execute:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>grep -e ^dont \/usr\/local\/nagios\/etc\/nrpe.cfg<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Output&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>dont_blame_nrpe=1<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Conclusion<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In brief, the cause of the error may be due to various reasons, follow the steps to resolve this error. If you need any assistance, consult our <a href=\"https:\/\/www.skynats.com\/contact-us\/\" target=\"_blank\" rel=\"noreferrer noopener\"><span style=\"color:#036792\" class=\"has-inline-color\">technical team<\/span><\/a> support to resolve the error on your behalf.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The NRPE now you can execute Nagios plugins remotely on the Linux\/Unix remote machine. In addition to this, you can also communicate with a few windows agent addons in order to executive scripts and check metrics on remote Windows machines. Our technical team support will fix any sort of Nagios queries under our&nbsp;server management plan. [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[485],"class_list":["post-6360","post","type-post","status-publish","format-standard","hentry","category-blog","tag-how-to-fix-nrpe-no-output-returned-from-plugin"],"_links":{"self":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/posts\/6360","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/comments?post=6360"}],"version-history":[{"count":0,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/posts\/6360\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/media?parent=6360"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/categories?post=6360"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/tags?post=6360"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}