{"id":748,"date":"2018-09-30T11:55:04","date_gmt":"2018-09-30T08:55:04","guid":{"rendered":"http:\/\/kifarunix.com\/?p=748"},"modified":"2024-03-11T19:32:55","modified_gmt":"2024-03-11T16:32:55","slug":"how-to-install-nagios-plugins-from-source-rhel-centos-oracle-linux","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/how-to-install-nagios-plugins-from-source-rhel-centos-oracle-linux\/","title":{"rendered":"Install Nagios Plugins From Source RHEL\/CentOS\/Oracle Linux"},"content":{"rendered":"\n<p>This guide describes how to install Nagios Plugins from Source RHEL\/CentOS\/Oracle Linux.&nbsp;In our previous tutorial, we learnt <a href=\"http:\/\/kifarunix.com\/monitoring\/how-to-install-nagios-nrpe-agent-on-rhel-centos-oracle-linux\/\" target=\"_blank\" rel=\"noopener noreferrer\">how to install Nagios NRPE Agent on RHEL\/CentOS\/Oracle Linux<\/a>. Well, for NRPE to collect various performance metrics on the system, it requires the Nagios plugins. Step through this guide in order to install Nagios Plugins.<\/p>\n\n\n\n<div class=\"wp-block-rank-math-toc-block\" id=\"rank-math-toc\"><h2>Table of Contents<\/h2><nav><ul><li><a href=\"#install-nagios-plugins-from-source-on-linux\">Install Nagios Plugins From Source on Linux<\/a><ul><li><a href=\"#install-required-build-tools\">Install Required Build Tools<\/a><\/li><li><a href=\"#download-nagios-plugins-source-code\">Download Nagios Plugins Source code<\/a><\/li><li><a href=\"#configure-the-nagios-plugins\">Configure the Nagios Plugins<\/a><\/li><li><a href=\"#compile-the-nagios-plugins-on-rhel-cent-os-oracle-linux\">Compile the Nagios Plugins on RHEL\/CentOS\/Oracle Linux<\/a><\/li><li><a href=\"#install-nagios-plugins-from-source\">Install Nagios Plugins From Source<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"install-nagios-plugins-from-source-on-linux\">Install Nagios Plugins From Source on Linux<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"install-required-build-tools\">Install Required Build Tools<\/h3>\n\n\n\n<p>In order to install Nagios Plugins from Source, you need to install a number of build tools. Run the command below to install these tools;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>yum install -y gcc glibc glibc-common make gettext automake autoconf wget openssl-devel net-snmp net-snmp-utils epel-release<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>yum install -y perl-Net-SNMP<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"download-nagios-plugins-source-code\">Download Nagios Plugins Source code<\/h3>\n\n\n\n<p>Download the latest version of Nagios plugins from <a href=\"https:\/\/www.nagios.org\/downloads\/nagios-plugins\/\" target=\"_blank\" rel=\"noopener noreferrer\">the nagios plugins downloads page<\/a>.<\/p>\n\n\n\n<p>You can simply run the following command to download the plugins. Replace the value of VER accordingly.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>VER=2.4.4<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>wget https:\/\/nagios-plugins.org\/download\/nagios-plugins-$VER.tar.gz<\/code><\/pre>\n\n\n\n<p>Once the download is complete, run the command below to extract the source code.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>tar xzf nagios-plugins-${VER}.tar.gz<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"configure-the-nagios-plugins\">Configure the Nagios Plugins<\/h3>\n\n\n\n<p>Once you have extracted the source code, navigate to the source code directory and run the configure script to initialize variables and create a Makefile, etc as shown below.<\/p>\n\n\n\n<p><strong>NOTE<\/strong>: Before you can proceed with the following steps, ensure that the gcc compilers are installed.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>cd nagios-plugins-${VER}<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>.\/configure<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"compile-the-nagios-plugins-on-rhel-cent-os-oracle-linux\">Compile the Nagios Plugins on RHEL\/CentOS\/Oracle Linux<\/h3>\n\n\n\n<p>Run the command below to compile Nagios plugins<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>make<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"install-nagios-plugins-from-source\">Install Nagios Plugins From Source<\/h3>\n\n\n\n<p>Install the compiled plugins and plugin scripts by running following command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>make install<\/code><\/pre>\n\n\n\n<p>Once the installation is done, all the plugins now reside under <strong>\/usr\/local\/nagios\/libexec\/ <\/strong>directory.<\/p>\n\n\n\n<p>You can verify the same by running the command below;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ls \/usr\/local\/nagios\/libexec\/<\/code><\/pre>\n\n\n\n<pre lass=\"scroll-box\">\ncheck_apt      check_disk      check_hpjd          check_ircd      check_nagios    check_nwstat  check_rpc      check_ssl_validity  check_uptime     utils.sh\ncheck_breeze   check_disk_smb  check_http          check_jabber    check_nntp      check_oracle  check_sensors  check_ssmtp         check_users\ncheck_by_ssh   check_dns       check_icmp          check_load      check_nntps     check_overcr  check_simap    check_swap          check_wave\ncheck_clamd    check_dummy     check_ide_smart     check_log       check_nt        check_ping    check_smtp     check_tcp           negate\ncheck_cluster  check_file_age  check_ifoperstatus  check_mailq     check_ntp       check_pop     check_snmp     check_time          remove_perfdata\ncheck_dhcp     check_flexlm    check_ifstatus      check_mrtg      check_ntp_peer  check_procs   check_spop     check_udp           urlize\ncheck_dig      check_ftp       check_imap          check_mrtgtraf  check_ntp_time  check_real    check_ssh      check_ups           utils.pm\n<\/code><\/pre>\n\n\n\n<p>That is all it takes to install Nagio Plugins from source RHEL\/CentOS\/Oracle Linux<\/p>\n\n\n\n<p>You may want to check our other articles;<\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/how-to-configure-availability-monitoring-on-alienvault-usm-ossim\/\" target=\"_blank\" rel=\"noopener noreferrer\">How configure Nagios Availability Monitoring on AlienVault USM\/OSSIM<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-nagios-nrpe-agents-on-ubuntu\/\" target=\"_blank\" rel=\"noreferrer noopener\">Install Nagios NRPE Agents on Ubuntu 22.04\/Ubuntu 20.04<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-nagios-nrpe-agents-on-debian-11-debian-10\/\" target=\"_blank\" rel=\"noreferrer noopener\">Install Nagios NRPE Agents on Debian 11\/Debian 10<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This guide describes how to install Nagios Plugins from Source RHEL\/CentOS\/Oracle Linux.&nbsp;In our previous tutorial, we learnt how to install Nagios NRPE Agent on RHEL\/CentOS\/Oracle<\/p>\n","protected":false},"author":1,"featured_media":14029,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[72,121,73],"tags":[5802,145,149,5803,5804,5805,147],"class_list":["post-748","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-monitoring","category-howtos","category-nagios","tag-install-nagios-plugins-from-source-on-rhel-centos-oracle-linux","tag-nagios-monitoring","tag-nagios-plugins","tag-nagios-plugins-centos","tag-nagios-plugins-oracle-linux","tag-nagios-plugins-rocky-linux","tag-nrpe","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50","resize-featured-image"],"_links":{"self":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/748"}],"collection":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/comments?post=748"}],"version-history":[{"count":9,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/748\/revisions"}],"predecessor-version":[{"id":20981,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/748\/revisions\/20981"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media\/14029"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=748"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=748"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=748"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}