Home » Categories » Products » Nagios Plugins » Installation

Nagios Plugins - Installing Nagios Plugins From Source

Overview

This KB article provides instructions on installing Nagios Plugins from source. You will have observed that most of the existing documentation already includes steps on installing the plugins. However there are some plugins that require other libraries which are not included in those instructions. The goal of this documentation is to provide the instructions to install every possible plugin that exists.

Nagios Plugins 2.2.0 is what this guide instructs you to install, however future versions should also work fine with these steps.

Some considerations:

  • It is assumed that you are logged onto the machine you are installing Nagios Plugins as the root user, or a user with sufficient privileges.

  • All of the steps below were tested on the operating systems (OS) listed after a clean install of the OS.

  • Some OS's like Ubuntu and SUSE have stricter user permissions, in those cases the listed commands have sudo in front of them to ensure you are able to complete the steps.

  • A best effort has been made to ensure if you follow all the relevant steps you will end up with a working installation of Nagios Plugins.

 

The KB article is broken up into the following steps:

  • Install Prerequisites - Common

  • Install Prerequisites - Package XYZ

    • Some plugins (MySQL for example) require addtional libraries and have their own section. They are also in their own section as not everyone requires to monitor that specific item.

    • Some sections are only populated with a few OS's, this is becasue the required packages already exist in a base installation of the OS and hence do not require addtional steps.

  • Download Nagios Plugins

  • Compile and Install Nagios Plugins

 

 

 

Prerequisites - Common

These are the common set of packages required for compiling most of the plugins. SNMP and required modules are included here are they are one of the most common types of network monitoring.

 

CentOS 5.x

yum install -y gcc glibc glibc-common make gettext automake wget openssl-devel net-snmp net-snmp-utils epel-release
yum install -y perl-Net-SNMP
cd /tmp
wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.60.tar.gz
tar xzf autoconf-2.60.tar.gz
cd /tmp/autoconf-2.60
./configure
make
make install

 

CentOS 6.x / 7.x

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

 

RHEL 5.x | Oracle Linux 5.x

cd /tmp
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-5.noarch.rpm
rpm -ihv epel-release-latest-5.noarch.rpm
yum install -y gcc glibc glibc-common make gettext automake wget openssl-devel net-snmp net-snmp-utils
yum install -y perl-Net-SNMP
wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.60.tar.gz
tar xzf autoconf-2.60.tar.gz
cd /tmp/autoconf-2.60
./configure
make
make install

 

RHEL 6.x | Oracle Linux 6.x

cd /tmp
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
rpm -ihv epel-release-latest-6.noarch.rpm
yum install -y gcc glibc glibc-common make gettext automake autoconf wget openssl-devel net-snmp net-snmp-utils
yum install -y perl-Net-SNMP

 

RHEL 7.x

cd /tmp
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -ihv epel-release-latest-7.noarch.rpm
subscription-manager repos --enable=rhel-7-server-optional-rpms
yum install -y gcc glibc glibc-common make gettext automake autoconf wget openssl-devel net-snmp net-snmp-utils
yum install -y perl-Net-SNMP

 

Oracle Linux 7.x

yum install -y yum-utils
yum-config-manager --enable ol7_optional_latest
cd /tmp
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -ihv epel-release-latest-7.noarch.rpm
yum install -y gcc glibc glibc-common make gettext automake autoconf wget openssl-devel net-snmp net-snmp-utils
yum install -y perl-Net-SNMP

 

Ubuntu

sudo apt-get update
sudo apt-get install -y autoconf gcc libc6 libmcrypt-dev make libssl-dev wget bc gawk dc build-essential snmp libnet-snmp-perl gettext

 

Debian

All steps on Debian require to run as root. To become root simply run:

su

All commands from this point onwards will be as root.

apt-get update
apt-get install -y autoconf gcc libc6 libmcrypt-dev make libssl-dev wget bc gawk dc build-essential snmp libnet-snmp-perl gettext

 

Fedora

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

 

SUSE SLES 11.3

cd /tmp
wget 'https://nu.novell.com/repo/$RCE/SLE11-SDK-SP3-Pool/sle-11-x86_64/rpm/x86_64/sle-sdk-release-11.3-1.69.x86_64.rpm'
wget 'https://nu.novell.com/repo/$RCE/SLE11-SDK-SP3-Pool/sle-11-x86_64/rpm/x86_64/sle-sdk-release-SDK-11.3-1.69.x86_64.rpm'
sudo rpm -ivh sle-sdk-release-*
sudo suse_register
sudo zypper --non-interactive install autoconf gcc glibc libmcrypt-devel make libopenssl-devel wget gettext gettext-runtime automake net-snmp perl-Net-SNMP

 

SUSE SLES 11.4

cd /tmp
wget 'https://nu.novell.com/repo/$RCE/SLE11-SDK-SP4-Pool/sle-11-x86_64/rpm/x86_64/sle-sdk-release-11.4-1.55.x86_64.rpm'
wget 'https://nu.novell.com/repo/$RCE/SLE11-SDK-SP4-Pool/sle-11-x86_64/rpm/x86_64/sle-sdk-release-SDK-11.4-1.55.x86_64.rpm'
sudo rpm -ivh sle-sdk-release-*
sudo suse_register
sudo zypper --non-interactive install autoconf gcc glibc libmcrypt-devel make libopenssl-devel wget gettext gettext-runtime automake net-snmp perl-Net-SNMP

 

SUSE SLES 12

sudo SUSEConnect -p sle-sdk/12/x86_64
sudo SUSEConnect -p sle-module-web-scripting/12/x86_64
sudo zypper --non-interactive install autoconf gcc glibc libmcrypt-devel make libopenssl-devel wget gettext gettext-runtime automake net-snmp perl-Net-SNMP

 

SUSE SLES 12.1

sudo SUSEConnect -p sle-sdk/12.1/x86_64
sudo SUSEConnect -p sle-module-web-scripting/12/x86_64
sudo zypper --non-interactive install autoconf gcc glibc libmcrypt-devel make libopenssl-devel wget gettext gettext-runtime automake net-snmp perl-Net-SNMP

 

SUSE SLES 12.2

sudo SUSEConnect -p sle-sdk/12.2/x86_64
sudo SUSEConnect -p sle-module-web-scripting/12/x86_64
sudo zypper --non-interactive install autoconf gcc glibc libmcrypt-devel make libopenssl-devel wget gettext gettext-runtime automake net-snmp perl-Net-SNMP

 

openSUSE Leap 42.1

sudo zypper --non-interactive install autoconf gcc glibc libmcrypt-devel make libopenssl-devel wget gettext gettext-runtime automake net-snmp perl-Net-SNMP

 

FreeBSD

pkg install -y wget autoconf automake gettext gcc openssl-devel net-snmp p5-Net-SNMP-Util

 

Solaris 10.x

echo 'PATH=/usr/sfw/bin:/usr/ccs/bin:/opt/csw/bin:/opt/csw/sbin:$PATH' >> $HOME/.profile
echo 'export PATH' >> $HOME/.profile
. $HOME/.profile
pkgadd -d http://get.opencsw.org/now
answer all
answer y
perl -ni.bak -le 'print; print "mirror=http://mirrors.ibiblio.org/opencsw/stable" if /mirror=/' /etc/opt/csw/pkgutil.conf
pkgutil -y -i autoconf
pkgutil -y -i automake

 

Solaris 11.x

echo 'export PATH=$PATH:/opt/csw/bin:/usr/xpg4/bin:/usr/sfw/bin' >> ~/.profile
source ~/.profile
pkgadd -d http://get.opencsw.org/now
answer all
answer y
perl -ni.bak -le 'print; print "mirror=http://mirrors.ibiblio.org/opencsw/stable" if /mirror=/' /etc/opt/csw/pkgutil.conf
pkgutil -y -i autoconf
pkgutil -y -i automake
pkg install gcc-45

 

Solaris Note: Some of the plugins require the NET::SNMP perl module. Please refer to the following documentation:

http://www.net-snmp.org/docs/README.solaris.html

 

 

 

Prerequisites - check_pgsql

This is required for the check_pgsql plugin.

 

CentOS | RHEL | Oracle Linux

yum install -y postgresql-devel

 

Ubuntu

sudo apt-get install -y libpqxx3-dev

 

Debian

apt-get install -y libpqxx3-dev

 

Fedora

dnf install -y libpqxx-devel

 

SUSE SLES | openSUSE

sudo zypper --non-interactive install postgresql94-devel

 

FreeBSD

pkg install -y postgresql-libpqxx

 

Solaris

Experienced problems getting this to work. If you have a solution please contact us.

 

 

 

Prerequisites - check_dbi

This is required for the check_dbi plugin.

 

CentOS | RHEL 5.x | Oracle Linux 5.x / 6.x

yum install -y libdbi-devel

 

RHEL 6.x

subscription-manager repos --enable=rhel-6-server-optional-rpms
yum install -y libdbi-devel

 

RHEL 7.x

subscription-manager repos --enable=rhel-7-server-optional-rpms
yum install -y libdbi-devel

 

Oracle Linux 7.x

yum install -y yum-utils
yum-config-manager --enable ol7_optional_latest
cd /tmp
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -ihv epel-release-latest-7.noarch.rpm
yum install -y libdbi-devel

 

Ubuntu

sudo apt-get install -y libdbi-dev

 

Debian

apt-get install -y libdbi-dev

 

Fedora

dnf install -y libdbi-devel

 

SUSE SLES 11.x

cd /tmp
wget https://downloads.sourceforge.net/project/libdbi/libdbi/libdbi-0.9.0/libdbi-0.9.0.tar.gz
tar xzf libdbi-0.9.0.tar.gz
cd libdbi-0.9.0/
sudo ./configure
sudo make
sudo make install

 

SUSE SLES 12.x | openSUSE

sudo zypper --non-interactive install libdbi-devel

 

FreeBSD

pkg install -y libdbi

 

Solaris

Experienced problems getting this to work. If you have a solution please contact us.

 

 

 

Prerequisites - check_radius

This is required for the check_radius plugin.

 

CentOS | RHEL | Oracle Linux

cd /tmp
wget -O freeradius-client.tar.gz https://github.com/FreeRADIUS/freeradius-client/archive/release_1_1_7.tar.gz
tar xzf freeradius-client.tar.gz
cd freeradius-client-release_1_1_7/
./configure
make
make install

 

Ubuntu 13.x

cd /tmp
wget https://github.com/FreeRADIUS/freeradius-client/archive/release_1_1_7.tar.gz
tar xzf release_1_1_7.tar.gz
cd freeradius-client-release_1_1_7/
sudo ./configure
sudo make
sudo make install

 

Ubuntu 14.x / 15.x / 16.x

sudo apt-get install -y libfreeradius-client-dev

 

Debian 7.x

cd /tmp
wget https://github.com/FreeRADIUS/freeradius-client/archive/release_1_1_7.tar.gz
tar xzf release_1_1_7.tar.gz
cd freeradius-client-release_1_1_7/
./configure
make
make install

 

Debian 8.x

apt-get install -y libfreeradius-client-dev

 

Fedora

dnf install -y freeradius-client-devel

 

SUSE SLES | openSUSE

sudo zypper --non-interactive install freeradius-client-devel

 

FreeBSD

pkg install -y freeradius-client

 

Solaris

Experienced problems getting this to work. If you have a solution please contact us.

 

 

 

Prerequisites - check_ldap

This is required for the check_ldap plugin.

 

CentOS | RHEL | Oracle Linux

yum install -y openldap-devel

 

Ubuntu

sudo apt-get install -y libldap2-dev

 

Debian

sudo apt-get install -y libldap2-dev

 

Fedora

dnf install -y openldap-devel

 

SUSE SLES | openSUSE

sudo zypper --non-interactive install openldap2-devel

 

FreeBSD

pkg install -y openldap-client

 

Solaris

pkgutil -y -i openldap_dev

 

 

 

Prerequisites - check_mysql check_mysql_query

This is required for the check_mysql and check_mysql_query plugins.

 

CentOS 5.x / 6.x | RHEL 5.x / 6.x | Oracle Linux 5.x / 6.x

yum install -y mysql-devel mysql-libs

 

CentOS 7.x | RHEL 7.x

yum install -y mariadb-devel mariadb-libs

 

Oracle Linux 7.x

cd /tmp
wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm
rpm -ivh mysql-community-release-el7-5.noarch.rpm
yum update -y
yum install -y mysql-community-devel mysql-community-libs

 

Ubuntu

sudo apt-get install -y libmysqlclient-dev

 

Debian

apt-get install -y libmysqlclient-dev

 

Fedora

dnf install -y community-mysql-devel

 

SUSE SLES | openSUSE

sudo zypper --non-interactive install libmysqlclient-devel

 

FreeBSD

pkg install -y mysql57-client

 

Solaris

pkgutil -y -i mysql_dev

 

 

 

Prerequisites - check_dig check_dns

This is required for the check_dig and check_dns plugins.

 

CentOS | RHEL | Oracle Linux

yum install -y bind-utils

 

SUSE SLES | openSUSE

sudo zypper --non-interactive install bind-utils

 

FreeBSD

pkg install -y bind-tools

 

 

 

Prerequisites - check_disk_smb

This is required for the check_disk_smb plugin.

 

CentOS | RHEL | Oracle Linux

yum install -y samba-client

 

Ubuntu

sudo apt-get install -y smbclient

 

Debian

apt-get install -y smbclient

 

Fedora

dnf install -y samba-client

 

SUSE SLES | openSUSE

sudo zypper --non-interactive install samba-client

 

FreeBSD

pkg install -y samba44

 

Solaris

pkgutil -y -i samba_client

 

 

 

Prerequisites - check_game

This is required for the check_game plugin.

 

CentOS | RHEL | Oracle Linux

This package comes from the EPEL repository (EPEL was enabled in the "Prerequisites - Common" section).

yum install -y qstat

 

Ubuntu

sudo apt-get install -y qstat

 

Debian

apt-get install -y qstat

 

Fedora

dnf install -y qstat

 

FreeBSD

pkg install -y qstat

 

SUSE SLES | openSUSE | Solaris

Experienced problems getting this to work. If you have a solution please contact us.

  

 

 

Prerequisites - check_fping

This is required for the check_fping plugin.

 

CentOS | RHEL | Oracle Linux

This package comes from the EPEL repository (EPEL was enabled in the "Prerequisites - Common" section).

yum install -y fping

 

Ubuntu

sudo apt-get install -y fping

 

Debian

apt-get install -y fping

 

Fedora

dnf install -y fping

 

SUSE SLES | openSUSE

sudo zypper --non-interactive install fping

 

FreeBSD

pkg install -y fping

 

Solaris 10.x

pkgutil -y -i fping

 

Solaris 11.x

pkg install fping

 

 

 

Prerequisites - check_by_ssh

This is required for the check_by_ssh plugin.

 

CentOS | RHEL | Oracle Linux

yum install -y openssh-clients

 

 

 

Prerequisites - check_sensors

This is required for the check_sensors plugin.

 

CentOS | RHEL | Oracle Linux

yum install -y lm_sensors

 

 

 

Prerequisites - check_mailq

This is required for the check_mailq plugin.

 

Ubuntu

sudo apt-get install -y qmail-tools

 

Debian

apt-get install -y qmail-tools

 

CentOS | RHEL | Oracle Linux | SUSE SLES | openSUSE | Fedora | FreeBSD | Solaris

Experienced problems getting this to work. If you have a solution please contact us.

 

 

 

Prerequisites - check_flexm

The check_flexm plugin requires lmstat from Globetrotter Software to monitor flexlm licenses. This a commercial product,  you will need to contact them for instructions on how to install lmstat on your OS.

 

 

 

Downloading the Source

CentOS | RHEL | Ubuntu | Fedora | SUSE SLES | openSUSE | Oracle Linux | Solaris 11.x | FreeBSD | Debian

cd /tmp
wget --no-check-certificate -O nagios-plugins.tar.gz https://github.com/nagios-plugins/nagios-plugins/archive/release-2.2.0.tar.gz
tar zxf nagios-plugins.tar.gz

 

Solaris 10

cd /tmp
wget --no-check-certificate -O nagios-plugins.tar.gz https://github.com/nagios-plugins/nagios-plugins/archive/release-2.2.0.tar.gz
gunzip -c nagios-plugins.tar.gz | tar -xf -

 

 

 

Compile + Install

CentOS | RHEL | Fedora | Oracle Linux | Debian | FreeBSD

cd /tmp/nagios-plugins-release-2.2.0/
./tools/setup
./configure
make
make install

 

Ubuntu | SUSE SLES | openSUSE

cd /tmp/nagios-plugins-release-2.2.0/
sudo ./tools/setup
sudo ./configure
sudo make
sudo make install

 

Solaris

cd /tmp/nagios-plugins-release-2.2.0/
./tools/setup
./configure
gmake
gmake install

 

 

 

Plugin Installation Location

The plugins will now be located in /usr/local/nagios/libexec/.
 

 

 

Final Thoughts

For any support related questions please visit the Nagios Support Forums at:

http://support.nagios.com/forum/

0 (0)
Article Rating (No Votes)
Rate this article
  • Icon PDFExport to PDF
  • Icon MS-WordExport to MS Word
Attachments Attachments
There are no attachments for this article.
Related Articles RSS Feed
There are no related articles for this article.