nagios can't loggin to PostgreSQL
Ron Koperdraad
r.m.koperdraad at wanadoo.nl
Tue Oct 29 08:59:45 CET 2002
Bryan,
I tried that allready but if you only change the resources.cfg and cgi.cfg
it won't work, I had to change the c files as well.
----- Original Message -----
From: "Bryan Liles" <lilesb at ijet.com>
To: <nagios-users at lists.sourceforge.net>
Sent: Tuesday, 29 October, 2002 00:35
Subject: Re: Re:[Nagios-users] nagios can't loggin to PostgreSQL
> I believe that you can set the port in the configuration files. Have a
> look at the default etc/resources.cfg, and notice how you can change the
> port numbers.
>
>
> On Mon, 2002-10-28 at 15:49, Ron Koperdraad wrote:
> > John,
> >
> > No I didn't got a aswer on my question, but I found a way to get it
> > working.
> > In the directory nagios-1.0b6/xdata/ you have to edit the following
files
> > xcddb.c xdddb.c xeddb.c xrddb.c xsddb.c.
> >
> > in these files you will find the following
> >
> > char xcddb_host[XCDDB_BUFFER_LENGTH]="";
> > char xcddb_username[XCDDB_BUFFER_LENGTH]="";
> > char xcddb_password[XCDDB_BUFFER_LENGTH]="";
> > char xcddb_database[XCDDB_BUFFER_LENGTH]="";
> > int xcddb_port=3306;
> > int xcddb_optimize_data=TRUE;
> >
> > The ip number of my nagios system = 192.168.0.10 and if you check out
the
> > /etc/services file you would see that port 3306 is the port for MySQL
for
> > PostgreSQL you have to change it to 5432.
> > The username, password and database are at my system the same (nagios)
so I
> > have changed the .c files as follows
> >
> > char xcddb_host[XCDDB_BUFFER_LENGTH]="192.168.0.10";
> > char xcddb_username[XCDDB_BUFFER_LENGTH]="nagios";
> > char xcddb_password[XCDDB_BUFFER_LENGTH]="nagios";
> > char xcddb_database[XCDDB_BUFFER_LENGTH]="nagios";
> > int xcddb_port=5432;
> > int xcddb_optimize_data=TRUE;
> >
> > recompiled nagios and now it's working fine.
> >
> > Regards
> >
> > Ron.
> >
> > > ----- Original Message -----
> > > From: "John Boggon" <john.boggon at member.sage-au.org.au>
> > > To: "Ron Koperdraad" <r.m.koperdraad at wanadoo.nl>
> > > Sent: Sunday, 27 October, 2002 10:31
> > > Subject: Re: [Nagios-users] nagios can't loggin to PostgreSQL
> > >
> > >
> > > > > Ron Koperdraad wrote:
> > > > >
> > > > > I have installed Nagios 1.0b6 with the compile option
> > > > > "--with-pgsql-xdata".
> > > > >
> > > > > within PostgreSQL version 7.2.1 I've created the database nagios
with
> > > > > the tables as described in the documentation, I created the user
> > > > > nagios gave him a password and set the appropriate rights.
> > > > >
> > > > > Nagios and PostgreSQL are installed on the same machine using
Redhat
> > > > > 7.3.
> > > > >
> > > > > if I start nagios I get the message Error: Could not connect to
> > > > > PostgreSQL database ' ' on host ' ' using username ' ' and
password
> > > > > ' '
> > > > >
> > > > > I get this message for Status data, Retention data, comment data
and
> > > > > downtime date
> > > > >
> > > > > in the resource.cfg the name of the database the port en the
> > > > > username/password are defined as the should be. Form a windows
> > > > > machine use access a can access the database.
> > > > >
> > > > > Ron K
> > > >
> > > > Ron,
> > > > Did you ever get an answer to this problem? I have the same
symptoms,
> > > > and would like to find a fix
> > > >
> > > > John.
> > > >
> > >
> >
> >
> >
> > -------------------------------------------------------
> > This sf.net email is sponsored by:ThinkGeek
> > Welcome to geek heaven.
> > http://thinkgeek.com/sf
> > _______________________________________________
> > Nagios-users mailing list
> > Nagios-users at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/nagios-users
>
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
>
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
More information about the Users
mailing list