CGI problems with PostgreSQL backend

Hannu Liljemark hannu.liljemark at laurea.fi
Tue Oct 8 10:25:17 CEST 2002


heya,

i can't get nagios web frontend to display status info etc. with postgresql
backend.

nagios seems to be storing data correctly to the postgresql database (i can
see everything with if i use psql command), 'nagios -v nagios.cfg' tells
everything is ok and i have triple-checked usernames, passwords, ports,
hostnames, databases in both cgi.cfg and resources.cfg.  grants are set
correctly (nagios uses nagios-username for postgres, cgis use nagcgi and
nagcgi only has select for the required tables).  most of the above info
probably isn't  required to solve this problem, but just to make sure...
and tell me if i left out something important! :-)

nagios.log or postgresql.log contain nothing, but when i turn the debug
levels to the max and tell syslog to grab the flood of messages, i see:

postgres[1268]: [69] DEBUG:  BackendStartup: forked pid=1416 socket=91
postgres[1416]: [69] FATAL 1:  no PostgreSQL user name specified in startup packet

nagios version is 1.0b6 and postgresql is 7.2.1 on debian woody.

i compiled nagios with:

./configure --prefix=/opt/nagios --with-cgiurl=/nagios/cgi-bin \
--with-htmurl=/nagios/ --with-nagios-user=nagios --with-nagios-grp=nagios \
--with-pgsql-downtime --with-pgsql-retention --with-pgsql-comments \
--with-pgsql-extinfo --with-pgsql-status --with-pgsql-xdata

and i did 'make all' followed by 'make install'. however, i think that
stuff is working properly. problem is somewhere deeper.

i tried searching the mailing list archives for answers, but didn't find
anything. if this was a problem and is fixed in cvs version, i guess i'll
pull out the latest sources later and give them a go.

so, i suppose it should work, but why does postgres say the cgi doesn't give
username to it properly?

heck, i even get notifications about service and host problems but the cgis
just can't access the database :-)

cheers,

hannu liljemark


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf




More information about the Users mailing list