Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 302611 - net-analyzer/pnp4nagios-0.6.2 error after upgrade
Summary: net-analyzer/pnp4nagios-0.6.2 error after upgrade
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Caleb Tennis (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-28 11:43 UTC by Clemente Aguiar
Modified: 2010-04-02 16:50 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Clemente Aguiar 2010-01-28 11:43:49 UTC
I have upgraded pnp4nagios from 0.4.14 to 0.6.2, and now when I try to see the graphs in Nagios I get the following error:

The requested URL /pnp4nagios/graph was not found on this server.

I think that this has to do with the path configuration differences between the ones selected by the Gentoo distribution and the default of pnp4nagios.
see http://docs.pnp4nagios.org/pnp-0.6/upgrade



Reproducible: Always
Comment 1 Marcel Pennewiß 2010-01-31 13:44:06 UTC
(In reply to comment #0)
> I think that this has to do with the path configuration differences between the
> ones selected by the Gentoo distribution and the default of pnp4nagios.
> see http://docs.pnp4nagios.org/pnp-0.6/upgrade

Postinst-Message should be changed to

Alias /pnp4nagios /usr/share/pnp
...
...

Comment 2 Marcel Pennewiß 2010-01-31 13:47:54 UTC
(In reply to comment #1)
> Postinst-Message should be changed to

We should also add the link from Clemente to the message because you have to delete the xml-files from perfdata-directory manually if you upgrade from version 0.4.
Comment 3 Jon Sippel 2010-02-01 14:53:46 UTC
I have upgraded from 0.4.14 to 0.6.2 and am seeing this error as well.  I have the correct Alias in my apache configs (as noted in Comment #1) and have manually removed all .xml files from the perfdata directory.  All post-install checks are green when I go to http://localhost/pnp4nagios after the upgrade.  Where else should I look for a problem?
Comment 4 Marcel Pennewiß 2010-02-01 15:10:09 UTC
(In reply to comment #3)
> Where else should I look for a problem?

/etc/pnp/config.php:
$conf['use_url_rewriting'] = 0;

did you set this to 1? To use url_rewriting you have to change your apache config... (i did not use this, so i did not create a working config).
Comment 5 Jon Sippel 2010-02-01 15:21:52 UTC
(In reply to comment #4)

> did you set this to 1? To use url_rewriting you have to change your apache
> config... (i did not use this, so i did not create a working config).

That is set to 1; are the required changes for apache documented somewhere?  I am allowing mod_rewrite (and pnp4nagios' environment test gives me a "Pass" for the "Apache Rewrite Module" check).

Comment 6 Jon Sippel 2010-02-01 18:48:12 UTC
I just got 0.6.2 working by disabling the 'use_url_rewriting' option in /etc/pnp/config.php and setting the action_url to /pnp4nagios/index.php/graph?host=$HOSTNAME$ in my Nagios template definitions.

I don't have a preference if the urls are rewritten or not, so I'm okay with this configuration going forward.  Hopefully this will help get the ebuild sorted out.
Comment 7 Marcel Pennewiß 2010-02-01 20:22:15 UTC
(In reply to comment #5)
> > did you set this to 1? To use url_rewriting you have to change your apache
> > config... (i did not use this, so i did not create a working config).
> 
> That is set to 1; are the required changes for apache documented somewhere?  I
> am allowing mod_rewrite (and pnp4nagios' environment test gives me a "Pass" for
> the "Apache Rewrite Module" check).

Full Apache-Config (including mod_rewrite) should be

        Alias /pnp4nagios /usr/share/pnp/
        <Directory /usr/share/pnp>
                AllowOverride AuthConfig
                Order allow,deny
                Allow from all
                <IfModule mod_rewrite.c>
                        # Turn on URL rewriting
                        RewriteEngine On
                        Options FollowSymLinks
                        # Installation directory
                        RewriteBase /pnp4nagios
                        # 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]
                </IfModule>
        </Directory>

This configuration is from sample-config-directory which is included in the source. maybe we can add some useflags (apache, lighttpd) and add the sample config for automatic installation and dependency-checks?

maybe I'll find time to do this in the next days...
Comment 8 Tobias Scherbaum (RETIRED) gentoo-dev 2010-04-02 16:50:33 UTC
(In reply to comment #7)
> This configuration is from sample-config-directory which is included in the
> source. maybe we can add some useflags (apache, lighttpd) and add the sample
> config for automatic installation and dependency-checks?
> 
> maybe I'll find time to do this in the next days...
> 

Did so for 0.6.3 (USE="apache2" and -D PNP in /etc/conf.d/apache2).