| Languages: |
English • Deutsch |
Install and Configure NagiosGrapher
|
What you need?
apt-get install autoconf rrdtool perl perl-base perl-modules libcalendar-simple-perl \
libgd-gd2-perl perlmagick librrds-perl liburi-perl
wget "http://LINK-URL" -O NagiosGrapher-x.x.x.tar.gz
Save the source code on your Nagios-Server in the /usr/local/src directory.
tar xzvf NagiosGrapher-x.x.x.tar.gz
cd NagiosGrapher-x.x.x
autoconf
./configure
# ./configure 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
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
Do you have another distribution? you can take a look in the file config.layout in the source folder
If you don't find your distribution there or you have another nagios configuration, please edit the config.layout file.
and send the developers your layout
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
make install
to upgrade an existing installation you need make update
interface file perffile_path /usr/local/nagios/var
cfg_dir=/usr/local/nagios/etc/serviceext process_performance_data=1 service_perfdata_file=/usr/local/nagios/var/service-perfdata service_perfdata_file_template=$HOSTNAME$\t$SERVICEDESC$\t$SERVICEOUTPUT$\t$SERVICEPERFDATA$\t$TIMET$\n service_perfdata_file_mode=a service_perfdata_file_processing_interval=30 service_perfdata_file_processing_command=process-service-perfdata-file
define command{
command_name process-service-perfdata-file
command_line mv /usr/local/nagios/var/service-perfdata /usr/local/nagios/var/service-perfdata.$TIMET$
}
This is a example:
cp ./ngraph.d/templates/standard/check_ping.ncfg_disabled ./ngraph.d/check_ping.ncfg
define ngraph{
service_name PING
graph_log_regex loss = ([0-9]*)
graph_value Loss
graph_units %
graph_legend Loss
graph_legend_eol none
page 2 Loss
rrd_plottype LINE2
rrd_color ff0000
}
/etc/init.d/nagiosgrapher stop /etc/init.d/nagiosgrapher start
/etc/init.d/nagios reload
The Grapher icon will not be displayed in the Nagios interface until a check for the service has been processed, FOLLOWED BY a reload of the Nagios process itself.
Here find you a tutorial for Regular Expressions.