Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
installing pnp4nagios 0.6 on gentoo [solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
Majed17
Apprentice
Apprentice


Joined: 31 Aug 2011
Posts: 261
Location: Minsk, Belarus

PostPosted: Thu Sep 15, 2011 12:15 pm    Post subject: installing pnp4nagios 0.6 on gentoo [solved] Reply with quote

hello i emerged pnp4nagios but i'm stuck in configuring it. i reached the point where in the browser when i type: http://10.1.1.212/pnp4nagios/ i get all PNP4Nagios Environment Testspassed execpt PHP socket extension i get
Code:
PHP socket extension PHP socket extension not available
i'm inclined to think that it has something to do with php even though all the previous tests passed:
Code:
PHP GD extension    Pass
PHP function proc_open()    Pass
PHP zlib extension    Pass
PHP session extension    Pass
PHP JSON extension    Pass
PHP magic_quotes_gpc    Off

perhaps there is a module that needs to be enabled in php? i.e when typing ./configure anyway here is my apache configuration:
for 98_pnp4nagios.conf
Code:
<IfDefine PNP>
        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>
</IfDefine>

for 99_nagios3.conf
Code:
<IfDefine NAGIOS>
   ScriptAlias /nagios/cgi-bin/ /usr/lib/nagios/cgi-bin/
   <Directory "/usr/lib/nagios/cgi-bin/">
      AllowOverride AuthConfig
      Options ExecCGI
      Order allow,deny
      Allow from all
   </Directory>
   Alias /nagios /usr/share/nagios/htdocs
   <Directory "/usr/share/nagios/htdocs">
      AllowOverride AuthConfig
      Order allow,deny
      Allow from all
   </Directory>

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


#<Directory "/usr/share/pnp">
<Directory "/usr/local/pnp4nagios/share">
           Options ExecCGI
       AllowOverride AuthConfig
       Order allow,deny
       Allow from all
       </Directory>

#   ScriptAlias /nagios/cgi-bin/ /usr/lib/nagios/cgi-bin/
#   <Directory "/usr/lib/nagios/cgi-bin/">
#      AllowOverride AuthConfig
#      Options ExecCGI
#      Order allow,deny
#      Allow from all
#   </Directory>
   <Directory "/etc/nagios/">
      AllowOverride AuthConfig
      Options ExecCGI
      Order allow,deny
      Allow from all
   </Directory>
#   Alias /nagios /usr/share/nagios/htdocs
#   <Directory "/usr/share/nagios/htdocs">
#      AllowOverride AuthConfig
#      Order allow,deny
#      Allow from all
#   </Directory>


</IfDefine>

in /etc/pnp/config.php i have url rewriting turn on
Code:
$conf['use_url_rewriting'] = 1;

any help or pointing in the right direction is appreciated.


Last edited by Majed17 on Wed Sep 21, 2011 8:35 am; edited 1 time in total
Back to top
View user's profile Send private message
Majed17
Apprentice
Apprentice


Joined: 31 Aug 2011
Posts: 261
Location: Minsk, Belarus

PostPosted: Fri Sep 16, 2011 1:04 pm    Post subject: Reply with quote

ok it worked after i added sockets to the make.conf file in /etc/make.conf
and now it looks like this :
Code:
USE="3dnow 3dnowext aalib acpi apache2 apm calendar cgi dhcpcd dict ftp ftpd
     fuse gd gzip jpeg jpeg2k jpgraph nagios-dns nagios-game nagios-ntp
     nagios-ping nagios-ssh ntfs pdf php png postfix rar reiser4 reiserfs
     rrdcgi rrdtool sendmail snmp splash sse sse2 sse3 ssh svg winbind
     wireshark xml zip [color=darkred]sockets[/color] -X -alsa -bittorrent -doc -ipv6"

after that i
Code:
emerged php
and it worked
itried before to download php and the
Code:
./configure --enable-sockets
but it gave an error for some reason regarding sockets
so now all the tests are passed:
Code:
PNP4Nagios Environment Tests

The following options are determined by "configure". If any of the tests have failed, consult the documentation for more information on how to correct the problem.
PNP4Nagios Version    pnp4nagios-0.6.13
Prefix    /usr/local/pnp4nagios
Configure Arguments    ./configure '--with-rrdtool=/usr/local/rrdtool/bin/rrdtool' '--with-httpd-conf=/usr/local/apache2/conf/extra' '--with-perl_lib_path=/usr/local/rrdtool/lib/perl/5.8.8/i386-linux-thread-multi' '--with-perfdata-dir=/var/nagios/perfdata'
RRD Storage    /var/nagios/perfdata is readable.
RRDtool Binary    /usr/local/rrdtool/bin/rrdtool is executable by PHP
PHP GD extension    Pass
PHP function proc_open()    Pass
PHP zlib extension    Pass
PHP session extension    Pass
PHP JSON extension    Pass
PHP magic_quotes_gpc    Off
PHP socket extension    Pass
Apache Rewrite Module    Pass
Kohana Environment Tests

The following tests have been run to determine if Kohana will work in your environment. If any of the tests have failed, consult the documentation for more information on how to correct the problem.
PHP Version    5.3.8-pl0-gentoo
System Directory    /usr/local/pnp4nagios/lib/kohana/system/
Application Directory    /usr/local/pnp4nagios/share/application/
Reflection Enabled    Pass
Iconv Extension Loaded    Pass
Mbstring Not Overloaded    Pass
URI Determination    Pass

Your environment passed all requirements. Remove or rename the /usr/local/pnp4nagios/share/install.php file now.


but now a new error appears :

Code:
PNP4Nagios Version 0.6.13
Please check the documentation for information about the following error.

Object of class stdClass could not be converted to string
file [line]:

application/views/template.php [100]:

back
   
Actions
Loaded in 0.0382 seconds, using 1.79MB of memory. Generated by Kohana v2.3.4.


i have no idea what might cause this error so can anyone help?

the apache configuration is as follows: (/etc/apache2/modules.d/99_nagios3.conf)[/quote]
Code:
<IfDefine NAGIOS>
#   ScriptAlias /nagios/cgi-bin/ /usr/lib/nagios/cgi-bin/
#   <Directory "/usr/lib/nagios/cgi-bin/">
#      AllowOverride AuthConfig
#      Options ExecCGI
#      Order allow,deny
#      Allow from all
#   </Directory>
#   Alias /nagios /usr/share/nagios/htdocs
#   <Directory "/usr/share/nagios/htdocs">
#      AllowOverride AuthConfig
#      Order allow,deny
#      Allow from all
#   </Directory>

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


#<Directory "/usr/share/pnp">
<Directory "/usr/local/pnp4nagios/share">
           Options ExecCGI
       AllowOverride AuthConfig
       Order allow,deny
       Allow from all
       </Directory>

   ScriptAlias /nagios/cgi-bin/ /usr/lib/nagios/cgi-bin/
   <Directory "/usr/lib/nagios/cgi-bin/">
      AllowOverride AuthConfig
      Options ExecCGI
      Order allow,deny
      Allow from all
   </Directory>
   <Directory "/etc/nagios/">
      AllowOverride AuthConfig
      Options ExecCGI
      Order allow,deny
      Allow from all
   </Directory>
   Alias /nagios /usr/share/nagios/htdocs
   <Directory "/usr/share/nagios/htdocs">
      AllowOverride AuthConfig
      Order allow,deny
      Allow from all
   </Directory>


</IfDefine>
Back to top
View user's profile Send private message
Majed17
Apprentice
Apprentice


Joined: 31 Aug 2011
Posts: 261
Location: Minsk, Belarus

PostPosted: Mon Sep 19, 2011 11:04 am    Post subject: Reply with quote

according to the configuration guide npcd should be started in the end. but when i try
Code:
/etc/init.d/npcd start

i get:
Code:
* Starting npcd ...
An Error occured while reading your config on line 0
Message was: "ERROR - Could not open config file - No such file or directory"
 * start-stop-daemon: failed to start `/usr/bin/npcd'
 * Failed to Start npcd                                                   [ !! ]
 * ERROR: npcd failed to start

i don't know were this configuration file should be.
i tried
Code:
emerge --search npcd

i got
Code:
Searching...    srvmonm libexec # emerge --search npcd
Searching...
[ Results for search key : npcd ]
[ Applications found : 0 ]

can anyone help with this?. it seems this application is essential for pnp4nagios 0.6
Back to top
View user's profile Send private message
Majed17
Apprentice
Apprentice


Joined: 31 Aug 2011
Posts: 261
Location: Minsk, Belarus

PostPosted: Wed Sep 21, 2011 8:34 am    Post subject: Reply with quote

it turns out when installing pnp4nagios one must add USE=apache and add -D PNP in /etc/conf.d/apache2 so the line looks like this now:
Code:
APACHE2_OPTS="-D DEFAULT_VHOST -D INFO -D SSL -D SSL_DEFAULT_VHOST -D LANGUAGE -D PHP5 -D PERL -D NAGIOS -D PNP"


hope someone finds this post of use :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum