Database integration

Larry Bills larry.bills at mci.com
Wed Oct 29 17:58:32 CET 2003


I have had a problem with the cgi's and the webserver when I went to 
postgre. Apache was not recognizing the LD_LIBRARY_PATH for the 
postgresql libraries on our Solaris 9 server. Adding the following  to 
the end of Apache httpd.conf solved the problem...you must have modenv 
loaded in Apache to do this of course.

PassEnv 
LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/u03/app/nagios/postgresql/lib
PassEnv 
PATH=/usr/local/bin:/usr/bin:/u03/app/nagios/postgresql/bin:/u03/app/nagios/postgresql/data

Hope this is of some assistance

Larry Bills

Marc Powell wrote:

>  
>
>>-----Original Message-----
>>From: eduardo moura [mailto:eduardo.moura at telway.com.br]
>>Sent: Tuesday, October 28, 2003 5:19 PM
>>To: Marc Powell
>>
>>Marc,
>>
>>Regarding your questions:
>>
>>Did you modify the database definitions in cgi.cfg appropriately?
>>
>>yes. Bellow follow a portion of my cgi.cfg file:
>>    
>>
>
>[snip]
>
>  
>
>># DB DOWNTIME DATA (Read-Only For CGIs)
>># Note: These config directives are only used if you compiled
>># in database support for downtime data!
>># The user you specify here only needs SELECT privileges on the
>># 'hostdowntime', and 'servicedowntime' tables in the database,
>># as these values are only used by the CGIs.  The core program
>># will read the directives you specify in a resource file.
>>
>>xdddb_host=localhost
>>xdddb_port=5432
>>xdddb_database=nagios
>>xdddb_username=postgres
>>xdddb_password=
>>
>>    
>>
>
>I am assuming that the user postgres is able to access the database with no password from localhost. Other than that, you appear to be missing an xrddb* section. Not sure if this is important but it could be.
>
>xrddb_host=localhost
>xrddb_port=5432
>xrddb_username=postgres
>xrddb_password=
>xrddb_database=nagios
>
>  
>
>>The postgresql server is in the same server of nagios process.
>>
>>Have you verified that the data is actually being inserted into postgres
>>by
>>nagios?
>>
>>yes. the nagios database have some data in the hostretentio table.
>>    
>>
>
>How about the servicestatus and hoststatus tables? Those are what the CGI's are reading. It could be that the permissions in the db are fine for hostretention, but not the other tables. In fact, I would verify permissions on all the objects in the database to be sure.
>
>  
>
>>What problem are you seeing with the CGI's exactly?
>>
>>accessing the tactical overview or any other options in the main menu the
>>message:
>>
>>Whoops!
>>Error: Could not read host and service status information!
>>
>>    
>>
>
>Is there any further information? Does it complain that the nagios process might not be running? That's a typical error message when using a DB for retention as the default nagios_check_command assumes that you are using flat files
>
>http://www.nagios.org/faqs/viewfaq.php?faq_id=170&expand=false&showdesc=true
>
>
>  
>
>>is showed. It´s seem some compilation problem. I have used the configure
>>shell has follows:
>>
>>
>>./configure --with-pgsql-xdata --with-pgsql-status  --with-pgsql-comments
>>--
>>with-pgsql-extinfo --with-pgsql-retention --with-pgsql-downtime
>>    
>>
>
>--with-pgsql-xdata implies all the others, but I don't think that's an issue. What makes you think it's a compilation problem? Did you see any errors during ./configure or make all that might be pertinent?
>
>
>--
>Marc
>
>
>-------------------------------------------------------
>This SF.net email is sponsored by: SF.net Giveback Program.
>Does SourceForge.net help you be more productive?  Does it
>help you create better code?   SHARE THE LOVE, and help us help
>YOU!  Click Here: http://sourceforge.net/donate/
>_______________________________________________
>Nagios-users mailing list
>Nagios-users at lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/nagios-users
>::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
>::: Messages without supporting info will risk being sent to /dev/null
>
>  
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20031029/098b558c/attachment.html>


More information about the Users mailing list