Nagios Plugins Installation

Before you can fully use information from this document please read the Nagios Core Installation document at first.


Nagios project is designed as framework that can be easily extended. According to this Nagios Core do not include any monitoring script at basic installation.

To provide standard monitoring features at Nagios Core we will need to install Nagios Plugins package. Mentioned package is set of most used Nagios monitoring scripts. This list can be easily extended with you own or any another script.

In general this document is only extending Nagios Core Installation document. The reason for splatting of this documents is that we are speaking about two different products of Nagios project that need to work together. According to this before you'll read this document read the Nagios Core Installation document.

Before we’ll start

Before you'll read this document read the Nagios Core Installation document.

Install Nagios Plugins

At the time of writing this document last stable release of Nagios Plugins was 2.0.3 . According to this I would like to focus on the last release of Nagios Plugins in this document. On another hand I think that you can use same installation steps for any Nagios Plugins release.

To find the last release of Nagios Plugins please visit the home page of Nagios project (the URLis mentioned at end of this document


# mkdir /usr/src/NagiosPlugins                                                    # Create directory for downloading of Nagios Plugins Source code
# cd /usr/src/NagiosPlugins                                                       # Change directory where the source files will be stored
# wget             # Download source of Nagios Plugins

I like to use the old UX way to store source code of installed software (at /usr/src/). This is preventing confusion.

After successful download of source files you shall be able to see:

# ll /usr/src/NagiosPlugins
total 2600
-rw-r--r--. 1 root root 2659772 Jun 26 16:18 nagios-plugins-2.0.3.tar.gz

Make the source code ready for installation

In general it is not required to install Nagios Plugins in to “/opt/” directory. In the case that you are familiar with NagiosXI you know that it is installing his files across the whole file system.

On another hand I personally prefer to install application in to “/opt” directory to keep the file system clean.

# cd /usr/src/NagiosPlugins                                                       # Change directory to location of Nagios Plugins source
# tar -vxzf nagios-plugins-2.0.3.tar.gz                                           # Un-zip & Un-tar the compressed Nagios Plugins source
# mkdir /opt/nagios-plugins-2.0.3                                                 # Create directory where will be Nagios Plugins installed

Configure Nagios Plugins source code

# cd /usr/src/NagiosPlugins/nagios-plugins-2.0.3                                  # Change directory to Un-compressed source data of Nagios Plugins

# ./configure                             \
--prefix=/opt/nagios-plugins-2.0.3/       \
--exec-prefix=/opt/nagios-plugins-2.0.3/  \
--datadir=/opt/nagios-plugins-2.0.3/doc/  \
--enable-extra-opts                       \
--enable-redhat-pthread-workaround        \
--enable-perl-modules                     \
--with-nagios-user=nagios                 \
--with-nagios-group=nagios                \
--with-ipv6                               \
--sysconfdir=/opt/nagios-4.0.7/etc/       \
--localstatedir=/opt/nagios-4.0.7/var/                                            # Configure Nagios Plugins source code

If you would like to see all configuration options use:

/usr/src/NagiosPlugins/nagios-plugins-2.0.3/configure –help

After successful configuration of Nagios Plugins source was done you shall see:

              --with-ping6-command: /bin/ping6 -n -U -w %d -c %d %s
               --with-ping-command: /bin/ping -n -U -w %d -c %d %s
                       --with-ipv6: yes
                      --with-mysql: no
                    --with-openssl: yes
                     --with-gnutls: no
               --enable-extra-opts: yes
                       --with-perl: /usr/bin/perl
             --enable-perl-modules: yes
                     --with-cgiurl: /nagios/cgi-bin
               --with-trusted-path: /bin:/sbin:/usr/bin:/usr/sbin
                   --enable-libtap: no

Compilation and Installation

# make                                                                            # Compile source code
# make install                                                                    # Install complied source code

If you would like to test compiled code before installing use

# make check

before you will run

# make install

Nagios Core is expecting to find all monitoring scripts at “libexec” directory. This can be changed at Nagios Core configuration. Any way I personally use simlinks to refer to the installed code at another location.

Some time it is really handy, especially in the case that you are going to renew the list of installed monitoring scripts (then it is possible to change the sinlinks on the flay)

# cd /opt/nagios-plugins-2.0.3/libexec/                                                                  # Location of installed monitoring scripts
# for i in `ls` ; do ln -s /opt/nagios-plugins-2.0.3/libexec/$i /opt/nagios-4.0.7/libexec/$i  ; done     # Create simlinks

As we are not running a Nagios as a root some plugins permission will need to be updated:

# chown root.nagios /opt/nagios-plugins-2.0.3/libexec/*
# chmod 4711 /opt/nagios-plugins-2.0.3/libexec/*


Homepage of Nagios Core:
Main download web sit:
Main Nagios Core download web site:
Main Plugins download web page:
Main Addons download web page:

QR Code
QR Code wiki:infrastructure_tools:nagios:nagios_plugins_installation (generated for current page)