<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
  <title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
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.<br>
<br>
PassEnv
LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/u03/app/nagios/postgresql/lib<br>
PassEnv
PATH=/usr/local/bin:/usr/bin:/u03/app/nagios/postgresql/bin:/u03/app/nagios/postgresql/data<br>
<br>
Hope this is of some assistance<br>
<br>
Larry Bills<br>
<br>
Marc Powell wrote:<br>
<blockquote type="cite"
 cite="midC9CEFBCE7FF63742A9EB319ABE8DDBCF094103@mismail.ena.com">
  <pre wrap="">
  </pre>
  <blockquote type="cite">
    <pre wrap="">-----Original Message-----
From: eduardo moura [<a class="moz-txt-link-freetext" href="mailto:eduardo.moura@telway.com.br">mailto:eduardo.moura@telway.com.br</a>]
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:
    </pre>
  </blockquote>
  <pre wrap=""><!---->
[snip]

  </pre>
  <blockquote type="cite">
    <pre wrap=""># 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=

    </pre>
  </blockquote>
  <pre wrap=""><!---->
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

  </pre>
  <blockquote type="cite">
    <pre wrap="">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.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
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.

  </pre>
  <blockquote type="cite">
    <pre wrap="">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!

    </pre>
  </blockquote>
  <pre wrap=""><!---->
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

<a class="moz-txt-link-freetext" href="http://www.nagios.org/faqs/viewfaq.php?faq_id=170&expand=false&showdesc=true">http://www.nagios.org/faqs/viewfaq.php?faq_id=170&expand=false&showdesc=true</a>


  </pre>
  <blockquote type="cite">
    <pre wrap="">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
    </pre>
  </blockquote>
  <pre wrap=""><!---->
--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: <a class="moz-txt-link-freetext" href="http://sourceforge.net/donate/">http://sourceforge.net/donate/</a>
_______________________________________________
Nagios-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a>
<a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/nagios-users">https://lists.sourceforge.net/lists/listinfo/nagios-users</a>
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null

  </pre>
</blockquote>
</body>
</html>