Search
j0ke.net Open Build Service
>
Projects
>
server:monitoring
>
pnp4nagios
> pnp4nagios.quick-start.txt
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File pnp4nagios.quick-start.txt of Package pnp4nagios
== Configuration of PNP for Nagios == === Configuring Apache2 === The pnp graphs can be viewed with a webinterface. If the webserver is not already running, start it with the following two commands: insserv apache2 rcapache2 start Per default, only connects from localhost are allowed. Adjust the configfile '''/etc/apache2/conf.d/nagios-pnp.conf''' for your needs. And define the apache server flag '''PNP4NAGIOS''' in '''/etc/sysconfig/apache2''' in the following line: APACHE_SERVER_FLAGS="PNP4NAGIOS" If not already done for nagios, create a password file for apache and add an apache user named 'nagiosadmin' (or any other username you like): touch /etc/nagios/htpasswd.users chown root:www /etc/nagios/htpasswd.users chmod 640 /etc/nagios/htpasswd.users htpasswd2 -s /etc/nagios/htpasswd.users nagiosadmin You can also use an alternative htpasswd file to allow only a limited amount of people to view the pnp graphs. Therefore you should point the 'AuthUserFile' value in '''/etc/apache2/conf.d/nagios-pnp.conf''' to the location of your htpasswd file. === Configuring Nagios === Your next step should now be to enable performance data in your '''/etc/nagios/nagios.cfg''' with following option: process_performance_data=1 and: host_perfdata_command=process-host-perfdata service_perfdata_command=process-service-perfdata In your commands.cfg you have to add a commands like this: define command { command_name process-service-perfdata command_line $USER1$/process_perfdata.pl } define command { command_name process-host-perfdata command_line $USER1$/process_perfdata.pl } and after this set the service option: process_perf_data 1 for each service that supports 'real' performance data and finaly which you wants to see within PNP. {{Info|With Nagios 3.x you can put "process_perf_data 1" in your service definition or template!}} === Including links in Nagios' Webfrontend === For integrating the URLs you could create "hostextinfo" or "serviceextinfo" objects: # For all hosts go to the overview page define hostextinfo { host_name * action_url /pnp/index.php?host=$HOSTNAME$ } or # For one service define serviceextinfo { host_name localhost service_description Ping action_url /pnp/index.php?host=$HOSTNAME$&srv=$SERVICEDESC$ } {{Info|With Nagios 3.x you can put "action_url" in your service definition or template!}} == Enabling the Nagios-Perfdata-C-Daemon == Don't forget to enable the Nagios-Perfdata-C-Daemon with insserv npcd rcnpcd start at the end... Have a lot of fun!