{"id":1662,"date":"2016-12-28T11:35:10","date_gmt":"2016-12-28T16:35:10","guid":{"rendered":"http:\/\/osric.com\/chris\/accidental-developer\/?p=1662"},"modified":"2017-01-12T18:30:47","modified_gmt":"2017-01-12T23:30:47","slug":"missing-nagios-plugins-in-centos-7","status":"publish","type":"post","link":"https:\/\/osric.com\/chris\/accidental-developer\/2016\/12\/missing-nagios-plugins-in-centos-7\/","title":{"rendered":"Missing Nagios plugins in CentOS 7"},"content":{"rendered":"<p>I set up a Nagios server on a CentOS 7 VM (Virtual Machine):<\/p>\n<p><code>sudo yum install epel-release<br \/>\nsudo yum install nrpe<br \/>\nsudo yum install nagios<\/code><\/p>\n<p>By default it sets up some basic checks for localhost. When I checked the Nagios site at http:\/\/127.0.0.1\/nagios\/, I found that even PING was critical:<\/p>\n<p><code>(No output on stdout) stderr: execvp(\/usr\/lib64\/nagios\/plugins\/check_ping, ...) failed. errno is 2: No such file or directory<\/code><\/p>\n<p>I checked the contents of the plugins directory:<\/p>\n<p><code># ls \/usr\/lib64\/nagios\/plugins<br \/>\neventhandlers  negate  urlize  utils.sh<\/code><\/p>\n<p>Sure enough, the usual suspects are not there. E.g.:<\/p>\n<ul>\n<li>check_load<\/li>\n<li>check_ping<\/li>\n<li>check_disk<\/li>\n<li>check_http<\/li>\n<li>check_procs<\/li>\n<\/ul>\n<p>Eventually I stumbled onto the following document, <code>\/usr\/share\/doc\/nagios-plugins-2.0.3\/README.Fedora<\/code>:<\/p>\n<blockquote><p>Fedora users<\/p>\n<p>Nagios plugins for Fedora have all been packaged separately. For<br \/>\nexample, to isntall the check_http just install nagios-plugins-http.<\/p>\n<p>All plugins are installed in the architecture dependent directory<br \/>\n\/usr\/lib{,64}\/nagios\/plugins\/.\n<\/p><\/blockquote>\n<p>I installed some of the plugins following that convention:<\/p>\n<p><code>sudo yum install nagios-plugins-load<br \/>\nsudo yum install nagios-plugins-ping<br \/>\nsudo yum install nagios-plugins-disk<br \/>\nsudo yum install nagios-plugins-http<br \/>\nsudo yum install nagios-plugins-procs<\/code><\/p>\n<p>Now the the corresponding plugins exist in <code>\/usr\/lib64\/nagios\/plugins<\/code>, and Nagios reports OK for those checks on localhost.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>After installing Nagios and NRPE on a CentOS 7 system, some of the expected Nagios plugins (e.g. check_ping) are missing. It turns out that in Fedora-derivatives, each plugin is its own separate RPM and needs to be installed individually, e.g. yum install nagios-plugins-ping.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[422],"tags":[414,415,217,348,416],"class_list":["post-1662","post","type-post","status-publish","format-standard","hentry","category-sysadmin","tag-centos","tag-centos-7","tag-monitoring","tag-nagios","tag-nrpe"],"_links":{"self":[{"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/posts\/1662","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=1662"}],"version-history":[{"count":1,"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/posts\/1662\/revisions"}],"predecessor-version":[{"id":1663,"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/posts\/1662\/revisions\/1663"}],"wp:attachment":[{"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/media?parent=1662"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/categories?post=1662"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/osric.com\/chris\/accidental-developer\/wp-json\/wp\/v2\/tags?post=1662"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}