previous next title contents index option index software index

3. Compiling

3.1. Compiling and Installing RRDTool

Note: If a usable version of RRDTool is already installed on your system, you can skip this section.

It might be necessary to install the recommended version of RRDTool but leave another version in place. This can be achieved quite easily by building RRDTool with a non-standard “Prefix”. Provided the user has permission to write into the prefix directory, it does not even have to be installed by root.

nagios@host> ./configure --prefix=$RRD_PREFIX --enable-shared \
> && make \
> && make install

builds and installs RRDTool into $RRD_PREFIX.

3.2. Compiling and Installing SNMP4Nagios

As of version 0.2 building SNMP4Nagios is based on GNU automake/autoconf.

nagios@host> ./configure \
> && make \
> && make install

is sufficient if all headers and libraries are found in standard directories.

Apart from the usual configure options there are a few options that can be used to customize the build:

Sets the prefix of the RRDTool installation. If librrd was installed as described above, then use --with-rrd=$RRD_PREFIX.
Default: Look for the rrd header and library files in the system directories.
Configures SNMP4Nagios without RRDTool. Logging and plotting are disabled.
Default: RRDTool is used, logging and plotting are enabled.
Sets the default directory where logging will put the RRD files.
Default: PREFIX/var/snmp4nagios/rrd
Sets the default directory where plotting will put the PNG files.
Default: PREFIX/var/snmp4nagios/png

Throughout this manual pathes will be referenced by the configure options used to set them. $BINDIR is set with “--bindir”, $RRDDIR is set with “--with-rrddir” and so on.

For the full list of compile time options, run “./configure --help”.

3.2.1. Compilation Problems

Currently those compilation problems are known: for snmp_sess_init... no.

Linking with Net-SNMP failed.

To compile SNMP4Nagios you need (the development versions of) Net-SNMP and all the libraries your version of Net-SNMP depends on. You can find out what those libraries are by running

nagios@host> net-snmp-config –libs

This returns the linker flags Net-SNMP requires.

Note: On some systems these files are not included in the “normal” package of a library but only in the “-devel”-version thereof.

As of now, Net-SNMP is known to possibly depend on these libraries:

library known package names
libbz2 bzip2
libcrypto openssl, openssl-devel
libdl glibc, glibc-devel
libm glibc, glibc-devel
librpm rpm, rpm-devel
librpmio rpm, rpm-devel
libwrap tcpd, tcpd-devel
libz zlib, zlib-devel It still does not compile

Please send a mail to the SNMP4Nagios mailing list containing

  • a description of the problem.
  • name and version of the operation system.
  • version of SNMP4Nagios.
  • version of Net-SNMP.
  • version of RRD-Tool (unless configured “--without-rrd”).
  • output of “net-snmp-config –cflags
  • output of “net-snmp-config –libs
  • the file config.log.
  • whatever you think could help solve the problem.
previous next title contents index option index software index Logo    Copyright © 2006, 2007 Peter Gritsch