How to Install Nagios Plugins From Source RHEL/CentOS/Oracle Linux

0
2994

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.

Download Nagios Plugins Source code

Download the latest version of Nagios plugins from here. You can simply run the following command to download the plugins.

# wget https://nagios-plugins.org/download/nagios-plugins-2.2.1.tar.gz

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

# tar xzf nagios-plugins-2.2.1.tar.gz

Configure the 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-2.2.1
# ./configure

Compile the Plugins

Run the command below to compile Nagios plugins

# make

Install the Plugins

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_flexlm        check_mrtg      check_ping     check_ups
check_breeze    check_ftp           check_mrtgtraf  check_pop      check_uptime
check_by_ssh    check_http          check_nagios    check_procs    check_users
check_clamd     check_icmp          check_nntp      check_real     check_wave
check_cluster   check_ide_smart     check_nrpe      check_rpc      negate
check_dhcp      check_ifoperstatus  check_nt        check_sensors  urlize
check_dig       check_ifstatus      check_ntp       check_smtp     utils.pm
check_disk      check_imap          check_ntp_peer  check_ssh      utils.sh
check_disk_smb  check_ircd          check_ntp_time  check_swap
check_dns       check_load          check_nwstat    check_tcp
check_dummy     check_log           check_oracle    check_time
check_file_age  check_mailq         check_overcr    check_udp

That is all it takes to install Nagio Plugins.

You may want to check our other articles on how configure Nagios Availability Monitoring on AlienVault USM/OSSIM. Thank you for reading.

LEAVE A REPLY

Please enter your comment!
Please enter your name here