Installation von pnp4nagios

pnp4nagios
Eine kurze Anleitung wie ich pnp4nagios installiert habe.

aptitude install rrdtool librrds-perl
perl -e 'use RRDs; print "$RRDs::VERSION\n"'
cd /root/download
wget http://heanet.dl.sourceforge.net/project/pnp4nagios/PNP-0.6/pnp4nagios-0.6.21.tar.gz

#+http://docs.pnp4nagios.org/de/pnp-0.6/install

tar -xvzf pnp4nagios-0.6.21.tar.gz
cd pnp4nagios-0.6.21

./configure --enable-perl-site-install

*** Configuration summary for pnp4nagios-0.6.21 03-24-2013 ***

General Options:
------------------------- -------------------
Nagios user/group: nagios nagios
Install directory: /usr/local/pnp4nagios
HTML Dir: /usr/local/pnp4nagios/share
Config Dir: /usr/local/pnp4nagios/etc
Location of rrdtool binary: /usr/bin/rrdtool Version 1.4.3
RRDs Perl Modules: FOUND (Version 1.4003)
RRD Files stored in: /usr/local/pnp4nagios/var/perfdata
process_perfdata.pl Logfile: /usr/local/pnp4nagios/var/perfdata.log
Perfdata files (NPCD) stored in: /usr/local/pnp4nagios/var/spool

Web Interface Options:
------------------------- -------------------
HTML URL: http://localhost/pnp4nagios
Apache Config File: /etc/apache2/conf.d/pnp4nagios.conf

Review the options above for accuracy. If they look okay,
type 'make all' to compile.

make all
make install
make install-webconf
make install-config
make install-init
aptitude install chkconfig
chkconfig --add npcd

/etc/init.d/npcd start

#+ http://docs.pnp4nagios.org/de/pnp-0.6/config#bulk_mode_with_npcd

nano /etc/nagios3/nagios.cfg
process_performance_data=1
#
# Service Performance-Daten
#
service_perfdata_file=/usr/local/pnp4nagios/var/service-perfdata
service_perfdata_file_template=DATATYPE::SERVICEPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tSERVICEDESC::$SERVICEDESC$\tSERVICEPERFDATA::$SERVICEPERFDATA$\tSERVICECHECKCOMMAND::$SERVICECHECKCOMMAND$\tHOSTSTATE::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$\tSERVICESTATE::$SERVICESTATE$\tSERVICESTATETYPE::$SERVICESTATETYPE$
service_perfdata_file_mode=a
service_perfdata_file_processing_interval=15
service_perfdata_file_processing_command=process-service-perfdata-file

#
# Host Performance-Daten ab Nagios 3.x
#
host_perfdata_file=/usr/local/pnp4nagios/var/host-perfdata
host_perfdata_file_template=DATATYPE::HOSTPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tHOSTPERFDATA::$HOSTPERFDATA$\tHOSTCHECKCOMMAND::$HOSTCHECKCOMMAND$\tHOSTSTATE::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$
host_perfdata_file_mode=a
host_perfdata_file_processing_interval=15
host_perfdata_file_processing_command=process-host-perfdata-file

nano /etc/nagios3/commands.cfg
define command{
command_name process-service-perfdata-file
command_line /bin/mv /usr/local/pnp4nagios/var/service-perfdata /usr/local/pnp4nagios/var/spool/service-perfdata.$TIMET$
}

define command{
command_name process-host-perfdata-file
command_line /bin/mv /usr/local/pnp4nagios/var/host-perfdata /usr/local/pnp4nagios/var/spool/host-perfdata.$TIMET$
}

/etc/init.d/nagios3 restart

Quelle:
NPCD automatisch starten

Kommentar verfassen

Diese Website verwendet Akismet, um Spam zu reduzieren. Erfahre mehr darüber, wie deine Kommentardaten verarbeitet werden.