{"id":184,"date":"2017-04-26T17:08:04","date_gmt":"2017-04-26T17:08:04","guid":{"rendered":"http:\/\/info.ffteixeira.net\/2017\/04\/26\/installation-of-nrpe-agent-on-debian-and-ubuntu\/"},"modified":"2017-04-26T17:08:04","modified_gmt":"2017-04-26T17:08:04","slug":"installation-of-nrpe-agent-on-debian-and-ubuntu","status":"publish","type":"post","link":"https:\/\/blog.ffteixeira.net\/?p=184","title":{"rendered":"Installation of NRPE agent on Debian and Ubuntu"},"content":{"rendered":"<div>This article intends to give the reader a brief introduction on how to install and configure the EPEL upstream version of the NRPE agent on Debian Linux 6, 7, 8 and Ubuntu 16.04.2 LTS.<\/p>\n<div id=\"main\">\n<div id=\"content\">\n<div id=\"main-content\">\n<p>Historically, OP5 has compiled and packaged the NRPE agent for a large number of Linux distributions, but as per Q2 2014 we stopped doing this since it required a lot of maintenance and time. More information on this decision can be found here: <a href=\"https:\/\/www.op5.com\/blog\/blogs\/op5-developers-blog\/deprecation-notices-q2-2014\/\">https:\/\/www.op5.com\/blog\/blogs\/op5-developers-blog\/deprecation-notices-q2-2014\/<\/a><\/p>\n<div><\/p>\n<div>\n<p>Note that this article is intended for Debian 6, 7, 8 and Ubuntu 16.04 client hosts, and that these steps never should be performed on an OP5 Monitor server.<\/p>\n<\/div>\n<\/div>\n<p>&nbsp;<\/p>\n<p>1. Install the NRPE package together with plugins:<\/p>\n<div>\n<div><\/div>\n<\/div>\n<p># apt-get install nagios-nrpe-server nagios-plugins-basic<\/p>\n<p>2. Create a new file called \/etc\/nagios\/nrpe.d\/op5_commands.cfg containing the following information:<\/p>\n<div>\n<div>\n<\/code><\/p>\n<\/div>\n<\/div>\n<p>These paths to the plugins should match the paths to the installed plugins in step 1.<\/p>\n<div title=\"Hint: double-click to select code\">\n<div title=\"Hint: double-click to select code\">\n<div><em>################################################################################<\/em><\/div>\n<div><em>#<\/em><\/div>\n<div><em># op5-nrpe command configuration file<\/em><\/div>\n<div><em>#<\/em><\/div>\n<div><em># COMMAND DEFINITIONS<\/em><\/div>\n<div><em># Syntax:<\/em><\/div>\n<div><em>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; command[&lt;command_name&gt;]=&lt;command_line&gt;<\/em><\/div>\n<div><em>#<\/em><\/div>\n<div><em>command[users]=\/usr\/lib\/nagios\/plugins\/check_users -w 5 -c 10<\/em><\/div>\n<div><em>command[load]=\/usr\/lib\/nagios\/plugins\/check_load -w 15,10,5 -c 30,25,20<\/em><\/div>\n<div><em>command[check_load]=\/usr\/lib\/nagios\/plugins\/check_load -w 15,10,5 -c 30,25,20<\/em><\/div>\n<div><em>command[swap]=\/usr\/lib\/nagios\/plugins\/check_swap -w 20% -c 10%<\/em><\/div>\n<div><em>command[root_disk]=\/usr\/lib\/nagios\/plugins\/check_disk -w 20% -c 10% -p \/ -m<\/em><\/div>\n<div><em>command[usr_disk]=\/usr\/lib\/nagios\/plugins\/check_disk -w 20% -c 10% -p \/usr -m<\/em><\/div>\n<div><em>command[var_disk]=\/usr\/lib\/nagios\/plugins\/check_disk -w 20% -c 10% -p \/var -m<\/em><\/div>\n<div><em>command[zombie_procs]=\/usr\/lib\/nagios\/plugins\/check_procs -w 5 -c 10 -s Z<\/em><\/div>\n<div><em>command[total_procs]=\/usr\/lib\/nagios\/plugins\/check_procs -w 190 -c 200<\/em><\/div>\n<div><em>command[proc_named]=\/usr\/lib\/nagios\/plugins\/check_procs -w 1: -c 1:2 -C named<\/em><\/div>\n<div><em>command[proc_crond]=\/usr\/lib\/nagios\/plugins\/check_procs -w 1: -c 1:5 -C cron<\/em><\/div>\n<div><em>command[proc_syslogd]=\/usr\/lib\/nagios\/plugins\/check_procs -w 1: -c 1:2 -C syslog-ng<\/em><\/div>\n<div><em>command[proc_rsyslogd]=\/usr\/lib\/nagios\/plugins\/check_procs -w 1: -c 1:2 -C rsyslogd<\/em><\/div>\n<\/div>\n<\/div>\n<div title=\"Hint: double-click to select code\">&nbsp;<\/div>\n<div title=\"Hint: double-click to select code\">&nbsp;<\/div>\n<p>3. Now edit \/etc\/nagios\/nrpe.cfg and add your Monitor server(s) address(es) to the allowed_hosts parameter as a comma-separated list in the appropriate section:<\/p>\n<div>\n<div><\/div>\n<\/div>\n<pre>\nallowed_hosts=127.0.0.1,10.0.0.10,10.0.0.11<\/pre>\n<p>4. Restart the nrpe agent on the host:<\/p>\n<div>\n<div><\/div>\n<\/div>\n<pre>\n\n# \/etc\/init.d\/nagios-nrpe-server restart<\/pre>\n<p>Now you can add the services via the function &quot;Add UNIX client services&quot; when adding a host in op5 Monitor.<\/p>\n<div><\/p>\n<div>\n<p>If the host is behind a firewall, or you have enabled firewall software on the host, you need to open for incoming traffic on TCP port 5666.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/kb.op5.com\/display\/HOWTOs\/Installation+of+NRPE+agent+on+Debian+and+Ubuntu\" target=\"_blank\" rel=\"noopener noreferrer\">Credits<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This article intends to give the reader a brief introduction on how to install and configure the EPEL upstream version of the NRPE agent on Debian Linux 6, 7, 8 and Ubuntu 16.04.2 LTS. Historically, OP5 has compiled and packaged &hellip; <a href=\"https:\/\/blog.ffteixeira.net\/?p=184\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-184","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blog.ffteixeira.net\/index.php?rest_route=\/wp\/v2\/posts\/184","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.ffteixeira.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.ffteixeira.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.ffteixeira.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.ffteixeira.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=184"}],"version-history":[{"count":0,"href":"https:\/\/blog.ffteixeira.net\/index.php?rest_route=\/wp\/v2\/posts\/184\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.ffteixeira.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=184"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.ffteixeira.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=184"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.ffteixeira.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=184"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}