In case you don't have nagios installed, you need to install it as described here
After installing nagios, please install the following packages:
[codesyntax lang="bash"]
apt-get install autoconf rrdtool perl perl-base perl-modules libcalendar-simple-perl libgd-gd2-perl perlmagick librrds-perl liburi-perl
[/codesyntax]
Download Nagios Grapher source code:
[codesyntax lang="bash"]
wget -c http://downloads.sourceforge.net/project/nagiosgrapher/nagiosgrapher/NagiosGrapher-1.7.1/NagiosGrapher-1.7.1.tar.gz
[/codesyntax]
Extract the archive
[codesyntax lang="bash"]
tar xfvz NagiosGrapher-1.7.1.tar.gz
[/codesyntax]
Run the NagiosGrapher configure script
[codesyntax lang="bash"]
cd NagiosGrapher-1.7.1 autoconf ./configure
[/codesyntax]
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
[codesyntax lang="bash"]
make testdeps
[/codesyntax]
/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
[codesyntax lang="bash"]
make install
[/codesyntax]
Source: https://www.monitoringexchange.org/wiki/HowTos:BestPractice:NagiosGrapher
0 Comentarii.