Install Nagios Plugins From Source RHEL/CentOS/Oracle Linux

|
Last Updated:
|
|

This guide describes how to install Nagios Plugins from Source RHEL/CentOS/Oracle Linux. In our previous tutorial, we learnt how to install Nagios NRPE Agent on RHEL/CentOS/Oracle Linux. 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.

Install Nagios Plugins From Source on Linux

Install Required Build Tools

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;

yum install -y gcc glibc glibc-common make gettext automake autoconf wget openssl-devel net-snmp net-snmp-utils epel-release
yum install -y perl-Net-SNMP

Download Nagios Plugins Source code

Download the latest version of Nagios plugins from the nagios plugins downloads page.

You can simply run the following command to download the plugins. Replace the value of VER accordingly.

VER=2.4.4
wget https://nagios-plugins.org/download/nagios-plugins-$VER.tar.gz

Once the download is complete, run the command below to extract the source code.

tar xzf nagios-plugins-${VER}.tar.gz

Configure the Nagios Plugins

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.

NOTE: Before you can proceed with the following steps, ensure that the gcc compilers are installed.

cd nagios-plugins-${VER}
./configure

Compile the Nagios Plugins on RHEL/CentOS/Oracle Linux

Run the command below to compile Nagios plugins

make

Install Nagios Plugins From Source

Install the compiled plugins and plugin scripts by running following command:

make install

Once the installation is done, all the plugins now reside under /usr/local/nagios/libexec/ directory.

You can verify the same by running the command below;

ls /usr/local/nagios/libexec/
check_apt      check_disk      check_hpjd          check_ircd      check_nagios    check_nwstat  check_rpc      check_ssl_validity  check_uptime     utils.sh
check_breeze   check_disk_smb  check_http          check_jabber    check_nntp      check_oracle  check_sensors  check_ssmtp         check_users
check_by_ssh   check_dns       check_icmp          check_load      check_nntps     check_overcr  check_simap    check_swap          check_wave
check_clamd    check_dummy     check_ide_smart     check_log       check_nt        check_ping    check_smtp     check_tcp           negate
check_cluster  check_file_age  check_ifoperstatus  check_mailq     check_ntp       check_pop     check_snmp     check_time          remove_perfdata
check_dhcp     check_flexlm    check_ifstatus      check_mrtg      check_ntp_peer  check_procs   check_spop     check_udp           urlize
check_dig      check_ftp       check_imap          check_mrtgtraf  check_ntp_time  check_real    check_ssh      check_ups           utils.pm

That is all it takes to install Nagio Plugins from source RHEL/CentOS/Oracle Linux

You may want to check our other articles;

How configure Nagios Availability Monitoring on AlienVault USM/OSSIM

Install Nagios NRPE Agents on Ubuntu 22.04/Ubuntu 20.04

Install Nagios NRPE Agents on Debian 11/Debian 10

SUPPORT US VIA A VIRTUAL CUP OF COFFEE

We're passionate about sharing our knowledge and experiences with you through our blog. If you appreciate our efforts, consider buying us a virtual coffee. Your support keeps us motivated and enables us to continually improve, ensuring that we can provide you with the best content possible. Thank you for being a coffee-fueled champion of our work!

Photo of author
koromicha
I am the Co-founder of Kifarunix.com, Linux and the whole FOSS enthusiast, Linux System Admin and a Blue Teamer who loves to share technological tips and hacks with others as a way of sharing knowledge as: "In vain have you acquired knowledge if you have not imparted it to others".

Leave a Comment