{"id":2623,"date":"2018-06-16T23:17:20","date_gmt":"2018-06-17T04:17:20","guid":{"rendered":"http:\/\/osric.com\/chris\/accidental-developer\/?p=2623"},"modified":"2018-06-16T23:17:20","modified_gmt":"2018-06-17T04:17:20","slug":"nrpe-unable-to-read-output","status":"publish","type":"post","link":"https:\/\/osric.com\/chris\/accidental-developer\/2018\/06\/nrpe-unable-to-read-output\/","title":{"rendered":"NRPE: Unable to read output"},"content":{"rendered":"<p>This one was a real facepalm moment, but I thought I&#8217;d share in case anyone else runs into the same thing.<\/p>\n<p>I&#8217;ve been working on migrating from Nagios to Icinga2. One of the services I monitor is whether or not a given host has any available yum updates. This service, which I label <code>check_yum<\/code>, worked on all my hosts except for the Icinga2 host. All the other services monitored on that host were working, but <code>check_yum<\/code> returned an error:<\/p>\n<pre><code>NRPE: Unable to read output<\/code><\/pre>\n<p>I tried running the test manually on the Icinga2 host:<\/p>\n<pre><code>\/usr\/lib64\/nagios\/plugins\/check_nrpe -H localhost -c check_yum\r\nNRPE: Unable to read output<\/code><\/pre>\n<p>I checked to make sure NRPE was listening, in this case via <code>xinetd<\/code>:<\/p>\n<pre><code>lsof -i<\/code><\/pre>\n<p>I checked the service definition to see what script\/plugin NRPE runs:<\/p>\n<pre><code>cat \/etc\/nrpe.d\/check_yum.cfg\r\ncommand[check_yum]=\/usr\/lib64\/nagios\/plugins\/check_updates -w 0 -c 10 -t 60<\/code><\/pre>\n<p>I tried to run that manually and&#8230;the file <code>\/usr\/lib64\/nagios\/plugins\/check_updates<\/code> did not exist.<\/p>\n<p>I installed the corresponding <code>yum<\/code> package:<\/p>\n<pre><code>sudo yum install nagios-plugins-check-updates<\/code><\/pre>\n<p>Now it works! It was a reminder to myself to check the basics before trying to troubleshoot network issues.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>My monitoring system, Icinga2, returned the error message &#8220;NRPE: Unable to read output&#8221; for an NRPE service check on one particular host. My troubleshooting steps started leading me down the wrong path, which is a good reminder to double-check basic functionality first.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[484],"tags":[495,348,416],"class_list":["post-2623","post","type-post","status-publish","format-standard","hentry","category-monitoring","tag-icinga2","tag-nagios","tag-nrpe"],"_links":{"self":[{"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/posts\/2623","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/comments?post=2623"}],"version-history":[{"count":4,"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/posts\/2623\/revisions"}],"predecessor-version":[{"id":2647,"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/posts\/2623\/revisions\/2647"}],"wp:attachment":[{"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/media?parent=2623"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/categories?post=2623"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/tags?post=2623"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}