Compile and Install Nagios Plugins on Rocky 9

We will be installing Nagios plugins from source.

Pre-requisites

Install packages required for compiling the plugins:

$ sudo yum install -y gcc glibc glibc-common make gettext automake autoconf \
  wget openssl-devel openssh-clients net-snmp net-snmp-utils epel-release \
  openldap-devel mysql-devel mysql-libs fping bind-utils samba-client qstat \
  lm_sensors perl-Net-SNMP

Make sure that /tmp is mounted with the exec flag:

$ sudo mount -o remount,exec /tmp

Installation

$ cd /tmp
$ wget --no-check-certificate -O nagios-plugins.tar.gz https://github.com/nagios-plugins/nagios-plugins/archive/release-2.4.10.tar.gz
$ tar zxf ./nagios-plugins.tar.gz
$ cd /tmp/nagios-plugins-release-2.4.10/
$ ./tools/setup
$ ./configure
$ make
$ sudo make install

Nagios plugins will be installed in /usr/local/nagios/libexec.

Leave a Reply

Your email address will not be published. Required fields are marked *