Skip to content

Installation Documentation

René Koch edited this page Oct 19, 2018 · 1 revision

There are multiple ways to install check_rhv. The easiest way is to install an RPM package if you're using a RPM-based distribution like Red Hat Enterprise Linux, CentOS, Fedora or SuSE Linux. For all other distribution the installation can be done from source code.

Requirements

There are a few Perl modules which are used by this plugin:

  • LWP::UserAgent
  • HTTP::Request
  • Getopt::Long
  • XML::Simple
  • Crypt::SSLeay

Most distributions provide these modules with packages:

Red Hat Enterprise Linux 6

# yum install perl-Crypt-SSLeay perl-libwww-perl perl-XML-Simple

Debian Squeeze

# apt-get install libwww-perl libcrypt-ssleay-perl libxml-simple-perl

Fedora, Red Hat Enterprise Linux 7

# yum install perl-libwww-perl perl-LWP-Protocol-https perl-HTTP-Message perl-XML-Simple

CPAN

If your distribution doesn't ship these modules, you can install them via CPAN:

# perl -MCPAN -e shell
cpan> install LWP::UserAgent
cpan> install HTTP::Request
cpan> install Getopt::Long
cpan> install XML::Simple
cpan> install Crypt::SSLeay

Of course you also need Perl and a monitoring tool like Icinga or Nagios.

Install RPM

Installing this plugin via RPM is quite simple:

# yum localinstall nagios-plugins-rhev3.rpm

For other RPM-based distributions you can easily create an RPM with the shipped SPEC-file.

# rpmbuild -ba nagios-plugins-rhv.spec

Install from Source Code

The check_rhv installation can be used by following the standard autotools installation process, documented in the INSTALL file.

As a quick start you can do

$ ./configure
$ make all
# make install

check_rhv will be installed to /usr/local/nagios/libexec and the PNP template to /usr/local/pnp4nagios/share/templates.

To change these paths use the following options: --prefix=<path_to_nagios_plugins> --with-pnp-dir=<path_to_pnp_share_folder>

For example:

$ ./configure --prefix=/usr/lib64/nagios/plugins --with-pnp-dir=/usr/share/nagios/html/pnp4nagios

If you don't use PNP you can disable installing the PNP template with: --disable-pnp-template

For example:

$ ./configure --disable-pnp-template

To change the user and group ownership of these files use: --with-nagios-user= --with-nagios-group=

For example:

$ ./configure --with-nagios-user=icinga --with-nagios-group=icinga

Install from Github

If you want the newest (unstable) version of this plugin you can Checkout from Github and compile and install it as described under Install from Source Code.

After checking out the plugin you have to run aclocal, autoconf and automake first to create configure script and Makefiles:

$ aclocal
$ autoconf
$ automake --add-missing

Afterwards you can proceed with compiling and installing as described under Install from Source Code.

If you're using RHEL 5/6/7 or CentOS 5/6/7 you need the following package to be able to run configure, which can be found in EPEL repository:

# yum install autoconf-archive