BSD Ports

net-mgmt/pnp 0.6.26_4 DragonFly

Nagios / Icinga performance data collector and grapher

System
DragonFly
Repository
DPorts
Maintainer
[email protected] (as in FreeBSD)
License
GPLv2
Categories
net-mgmt
Package size
2303.4 KiB, 5112.0 KiB installed

Description

PNP is an addon to nagios which analyzes performance data provided by plugins and stores them automatically into RRD-databases (Round Robin Databases, see RRD Tool).

During development of PNP we set value on easy installation and little maintenance while running it. An administrator should do other things than configure graphing tools.

In the other systems

SystemPortVersion
DragonFlynet-mgmt/pnp0.6.26_4
FreeBSDnet-mgmt/pnp0.6.26_4
HardenedBSDnet-mgmt/pnp0.6.26_4
GhostBSDnet-mgmt/pnp0.6.26_4

Install

Binary package:

pkg install pnp

From DPorts:

cd /usr/dports/net-mgmt/pnp && make install clean

Dependencies

Run dependencies 11

No port depends on this one.

Configuration

No options to configure.

Service scripts
none

Message after installing

You just installed/upgraded PNP graphing tool for nagios.

You will need to read the documentation at
  http://docs.pnp4nagios.org/pnp-0.6/doc_complete
both for new installations and upgrades from 0.4, since you will
need to tweak your nagios and PNP configuration according to the
0.6.x recipes.

We recommend to start with the following restrictive Apache configuration for
the PNP area:
{{{
# PNP graphing tool
Alias /nagios/pnp /usr/local/www/pnp
<Directory "/usr/local/www/pnp/">
    Order deny,allow
    Allow from all
    Deny from all

    AddHandler application/x-httpd-php .php
    DirectoryIndex index.php

    RewriteEngine on
    RewriteBase /nagios/pnp/
    # Protect application and system files from being viewed
    RewriteRule ^(application|modules|system) - [F,L]
    # Allow any files or directories that exist to be displayed directly
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    # Rewrite all other URLs to index.php/URL
    RewriteRule .* index.php/$0 [PT,L]
</Directory>
# PNP graphing tool
Alias /nagios/pnp /usr/local/www/pnp

<Directory /usr/local/www/pnp>
   <IfModule mod_authz_core.c>
      # Apache 2.4
      <RequireAll>
         Require all granted
         # Require local
         Require valid-user
      </RequireAll>
   </IfModule>
   <IfModule !mod_authz_core.c>
      # Apache 2.2
      Order allow,deny
      Allow from all
      #  Order deny,allow
      #  Deny from all
      #  Allow from 127.0.0.1
      Require valid-user
   </IfModule>

    AuthName "PNP Access"
    AuthType Basic
    AuthUserFile /usr/local/etc%%NAGIOSHTMURL%%/htpasswd.users

    AddHandler application/x-httpd-php .php
    DirectoryIndex index.php

    RewriteEngine on
    RewriteBase /nagios/pnp/
    # Protect application and system files from being viewed
    RewriteRule ^(application|modules|system) - [F,L]
    # Allow any files or directories that exist to be displayed directly
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    # Rewrite all other URLs to index.php/URL
    RewriteRule .* index.php/$0 [PT,L]
</Directory>
}}}

Don't forget to install and enable www/mod_php5 as well as mod_rewrite.

If you use another web server like nginx or lighttpd, take a look at
/usr/local/share/examples/pnp

Create /usr/local/www/pnp/install.ignore to disable sanity check
and start using PNP.

Please, note that user who runs Apache processes should be able to
read PNP RRD spool files from
  /var/spool/nagios/pnp/rrd
so you should tune path permissions accordingly.  Probably one could
start from adding Apache user to the group 'nagios'.

Remember to restart NPCD service after upgrade if you're using
'bulk' mode with NPCD.