Page 1 of 1

pnp4nagios performance graph

Posted: Mon Oct 12, 2015 1:32 pm
by murawweh.daher
Hi All,

i run pnp4nagios today and it's good.
can i use default performance graph beside pnp4nagios?
if i want to return to default view, what should i do as rollback?

Re: pnp4nagios performance graph

Posted: Mon Oct 12, 2015 4:49 pm
by lmiltchev
Can you elaborate? Did you install pnp4nagios on Nagios XI? What version/mode of pnp4nagios? What is the version of Nagios XI that you are currently running?

Re: pnp4nagios performance graph

Posted: Mon Oct 12, 2015 11:56 pm
by murawweh.daher
i installed the pnp4nagios in my nagios xi server.
pnp4nagios version 0.6.25.
Nagios XI Version : 2014R2.7

Re: pnp4nagios performance graph

Posted: Tue Oct 13, 2015 9:02 am
by jdalrymple
You should be aware that pnp4nagios is already installed and is a critical piece of NagiosXI's built in performance graphing. By installing again you've probably overwritten some of the necessary components used in graphing on NagiosXI.

Are performance graphs in NagiosXI still working, or have they broken? If they have broken then getting them back into a working state may be easiest handled by backing up your config, then reinstalling a new instances and restoring the config.

Re: pnp4nagios performance graph

Posted: Wed Oct 14, 2015 12:19 am
by murawweh.daher
is there a way to keep both running?

Re: pnp4nagios performance graph

Posted: Wed Oct 14, 2015 4:24 am
by mopp
pnp4nagios has some nice features like special templates. It would be nice to have access to the pnp4nagios web page.
But it looks like this web page was removed.

Re: pnp4nagios performance graph

Posted: Wed Oct 14, 2015 11:40 am
by jdalrymple
mopp wrote:pnp4nagios has some nice features like special templates.
You can use pnp4nagios templates in XI. Find the templates directories under /usr/local/nagios/share/pnp
mopp wrote:It would be nice to have access to the pnp4nagios web page.
It took me about 3 minutes to configure this.

Code: Select all

Alias /pnp4nagios "/usr/local/nagios/share/pnp"

<Directory "/usr/local/nagios/share/pnp">
        AllowOverride None
        Order allow,deny
        Allow from all
        AuthName "pnp4nagios"
        AuthType Basic
        AuthUserFile /usr/local/nagiosxi/etc/htpasswd.users
        Require valid-user
        <IfModule mod_rewrite.c>
                # Turn on URL rewriting
                RewriteEngine On
                Options symLinksIfOwnerMatch
                # Installation directory
                RewriteBase /pnp4nagios/
                # Protect application and system files from being viewed
                RewriteRule "^(?:application|modules|system)/" - [F]
                # 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]
        </IfModule>
</Directory>
As mentioned - I suspect this stuff won't work right for you now that you've installed pnp in a new location. Maybe it will, maybe not. Hard to say at this point.

Re: pnp4nagios performance graph

Posted: Wed Oct 14, 2015 5:01 pm
by mopp
jdalrymple wrote:As mentioned - I suspect this stuff won't work right for you now that you've installed pnp in a new location. Maybe it will, maybe not. Hard to say at this point.
@murawweh.daher: I did the following which should not break the existing Nagios XI installation, but offers you the new features of the pnp4nagios web interface. The installed Nagios XI pnp4nagios web interface 0.4.13 is from 02/19/2009

Tested with the latest github version. Extract the source code.

Code: Select all

# ./configure --with-perfdata-dir=/usr/local/nagios/share/perfdata
# make install-html
# make install-config
# cp -p sample-config/httpd.conf /etc/httpd/conf.d/pnp4nagios.conf
# sed -i -e 's#AuthUserFile /usr/local/nagios/etc/htpasswd.users#AuthUserFile /usr/local/nagiosxi/etc/htpasswd.users#g' /etc/httpd/conf.d/pnp4nagios.conf
# cd lib
# make install
# service httpd restart
Open http://nagios-server/pnp4nagios/index.php
If the test was successful remove /usr/local/pnp4nagios/share/install.php

Code: Select all

# rm /usr/local/pnp4nagios/share/install.php

Re: pnp4nagios performance graph

Posted: Thu Oct 15, 2015 1:33 pm
by tmcdonald
I do need to point out that the above procedure provided by @mopp has not been tested by Nagios, and is not guaranteed to work. Feel free to try either of the above procedures however, and let us know the results.