How to install Nagios Grapher on debian squeeze

In case you don't have nagios installed, you need to install it as described here

After installing nagios, please install the following packages:

apt-get install autoconf rrdtool perl perl-base perl-modules libcalendar-simple-perl libgd-gd2-perl perlmagick librrds-perl liburi-perl

Download Nagios Grapher source code:

wget -c http://downloads.sourceforge.net/project/nagiosgrapher/nagiosgrapher/NagiosGrapher-1.7.1/NagiosGrapher-1.7.1.tar.gz

Extract the archive

tar xfvz NagiosGrapher-1.7.1.tar.gz

Run the NagiosGrapher configure script

cd NagiosGrapher-1.7.1
autoconf
./configure

Check the output
checking for a BSD-compatible install... /usr/bin/install -c
checking for gawk... no
checking for mawk... mawk
checking for perl... /usr/bin/perl
checking distribution... found debian
checking for layout... debian
checking layout: directory prefix... set to '/usr/local/nagios'
checking for init_scripts/nagios_grapher.debian... yes
checking if user www-data exists... found
checking if group www-data exists... found
configure: creating ./config.status
config.status: creating Makefile
config.status: creating bin/collect2.pl
config.status: creating bin/fifo_write.pl
config.status: creating lib/NagiosGrapher.pm
config.status: creating lib/NagiosGrapher/HTML.pm
config.status: creating lib/NagiosGrapher/Hooks/Generic.pm
config.status: creating lib/NagiosGrapher/Hooks/SrvExtWriteHostextInfo.pm
config.status: creating sbin/graphs.cgi
config.status: creating sbin/rrd2-graph.cgi
config.status: creating sbin/rrd2-system.cgi
config.status: creating nagios_grapher
config.status: creating cfg/ngraph.ncfg
config.status: creating cfg/logrotate/nagios_grapher

The important options are distribution, layout, directory prefix and init_scripts
checking distribution... found debian
checking for layout... debian
checking layout: directory prefix... set to '/usr/local/nagios'
checking for init_scripts/nagios_grapher.debian... yes

Checking the required perl-libs

make testdeps

/usr/bin/perl ./tools/testdeps.pl
Checking Data::Dumper ... found
Checking File::Copy ... found
Checking File::Basename ... found
Checking Carp ... found
Checking POSIX ... found
Checking Time::HiRes ... found
Checking Time::Local ... found
Checking Storable ... found
Checking GD ... found
Checking Image::Magick ... found
Checking RRDs ... found
Checking CGI ... found
Checking CGI::Carp ... found
Checking IO::Handle ... found
Checking URI::Escape ... found
Checking Calendar::Simple ... found

If you have a not found you can install the required perl modules with CPAN, or your distributions software management system.

Installing the NagiosGrapher

make install

Source: https://www.monitoringexchange.org/wiki/HowTos:BestPractice:NagiosGrapher

Leave a Reply

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