{"id":1326,"date":"2020-10-12T16:10:51","date_gmt":"2020-10-12T03:10:51","guid":{"rendered":"https:\/\/www.ronella.xyz\/?p=1326"},"modified":"2020-10-13T13:38:48","modified_gmt":"2020-10-13T00:38:48","slug":"compiling-nrpe-4-plugin-to-tinkerboard","status":"publish","type":"post","link":"https:\/\/www.ronella.xyz\/?p=1326","title":{"rendered":"Compiling NRPE 4 Plugin to Tinkerboard"},"content":{"rendered":"<h1>Installing NRPE<\/h1>\n<ol>\n<li>Refresh the repository:\n<pre style=\"white-space: pre;\">sudo apt-get update<\/pre>\n<\/li>\n<li>Install the dependencies:\n<pre style=\"white-space: pre;\">sudo apt-get install libssl-dev -y<\/pre>\n<\/li>\n<li>Change the directory to your home directory:\n<pre style=\"white-space: pre;\">cd ~<\/pre>\n<\/li>\n<li>Download the <strong>nrpe 4<\/strong> source codes:\n<pre style=\"white-space: pre;\">wget https:\/\/github.com\/NagiosEnterprises\/nrpe\/releases\/download\/nrpe-4.0.3\/nrpe-4.0.3.tar.gz<\/pre>\n<\/li>\n<li>Extract the downloaded source codes:\n<pre style=\"white-space: pre;\">tar xvf nrpe-4.0.3.tar.gz<\/pre>\n<\/li>\n<li>Change to the directory of the newly extracted source codes:\n<pre style=\"white-space: pre;\">cd nrpe-4.0.3<\/pre>\n<\/li>\n<li>Run the configure script:\n<pre style=\"white-space: pre;\">.\/configure<\/pre>\n<\/li>\n<li>Compile the <strong>check_nrpe<\/strong> plugin only:\n<pre style=\"white-space: pre;\">sudo make check_nrpe<\/pre>\n<\/li>\n<li>Install the newly compiled plugin:\n<pre style=\"white-space: pre;\">sudo make install-plugin<\/pre>\n<\/li>\n<li>Update the file <strong>\/usr\/local\/nagios\/etc\/objects\/commands.cfg<\/strong> to add the following entry:\n<pre style=\"white-space: pre;\">define command {\r\n\tcommand_name    check_nrpe\r\n\tcommand_line    \/usr\/local\/nagios\/libexec\/check_nrpe -H $HOSTADDRESS$ -t 30 -c $ARG1$ $ARG2$\r\n}<\/pre>\n<\/li>\n<\/ol>\n<h1>Testing The Plugin<\/h1>\n<p>Using the command <strong>check_nrpe<\/strong> we can check the load on the host 10.0.0.202 <i>(i.e. NRPE daemon must be configured and listening on port 5666)<\/i> using the following command:<\/p>\n<pre style=\"white-space: pre;\">\/usr\/local\/nagios\/libexec\/check_nrpe -H 10.0.0.202 -c check_load<\/pre>\n<blockquote><p>Expect to see the output of the <strong>check_load plugin<\/strong> executed on the <strong>host 10.0.0.202<\/strong><\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>Installing NRPE Refresh the repository: sudo apt-get update Install the dependencies: sudo apt-get install libssl-dev -y Change the directory to your home directory: cd ~ Download the nrpe 4 source codes: wget https:\/\/github.com\/NagiosEnterprises\/nrpe\/releases\/download\/nrpe-4.0.3\/nrpe-4.0.3.tar.gz Extract the downloaded source codes: tar xvf nrpe-4.0.3.tar.gz Change to the directory of the newly extracted source codes: cd nrpe-4.0.3 Run the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[55,65,13,24,28],"tags":[],"_links":{"self":[{"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=\/wp\/v2\/posts\/1326"}],"collection":[{"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1326"}],"version-history":[{"count":4,"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=\/wp\/v2\/posts\/1326\/revisions"}],"predecessor-version":[{"id":1343,"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=\/wp\/v2\/posts\/1326\/revisions\/1343"}],"wp:attachment":[{"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1326"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1326"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1326"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}