Thread: RE: [Nagios-db-devel] Error loading module
Status: Beta
Brought to you by:
bench23
From: Michael H. <mic...@ax...> - 2005-05-05 23:52:08
|
I modified the makefile with the correct locations of the postgres = libraries and Nagios headers for my system: =20 all: gcc -Wall -g -O2 -o inserter.o inserter.c -shared = -I/usr/local/src/nagios-2.0b3/include -I/usr/local/pgsql/include = /usr/lib/libpq.a =20 and did "make all". In hindsight the pgsql include directory did nothing = as that directory doesn't exist but the postgres header is in = /usr/include (rpm install of postgres) so it all worked out in the end. = I copied the resulting inserter.o to my nagios installation. =20 I am using the tarball from sourceforge; I'm not a developer and don't = have CVS set up. =20 Is there any chance that you could do a new release? Being able to = configure the module would be a really nice feature to have... :) =20 Also if you could add a paragraph to README about how to add the NEB = module to nagios (ie use a "broker_module" directive in nagios.cfg) this = would be appreciated. As with all things it's obvious in hindsight but I = did spend some time yesterday wondering WTF I was supposed to do with = inserter.o. =20 Thanks! =20 Michael =20 =20 ________________________________ From: Ben [mailto:be...@si...] Sent: Fri 6/05/2005 9:37 AM To: Michael Henry Cc: nag...@li... Subject: Re: [Nagios-db-devel] Error loading module How did you compile the module? Somebody else had a similar issue, but they had ommited some libraries. If you pull from CVS, you can set the connection params in your nagios config file. If you pull the most recent tarball (0.91 I believe) then = you have to modify inserter.c to change your connection settings. On Thu, 5 May 2005, Michael Henry wrote: > Hi, >=20 > I get the following error in my nagios.log when I configure Nagios = to use the provided postgres module: >=20 > [1115279003] Error: Could not load module = '/usr/local/nagios/neb/inserter.o' -> /usr/local/nagios/neb/inserter.o: = undefined symbol: BIO_new_mem_buf > > Also: How do I configure the module to connect to my database? Is it = hard-coded in the source? >=20 > Thanks, >=20 > Michael >=20 >=20 >=20 > |
From: Thibault G. <thi...@sr...> - 2005-05-06 15:01:52
|
You need to tweak the makefile provided with inserter.c to add the libs = that contain BIO_new_mem_buf and some other functions. Those libs are = commented out, below the active lines: "-lssl -lkrb5 -lcrypt". Of course = you need the corresponding libs installed. And yes the connection string is hardcoded, at the line 78. Just put = your server and DB name here ________________________________________ De=A0: Michael Henry [mailto:mic...@ax...]=20 Envoy=E9=A0: jeudi 5 mai 2005 10:02 =C0=A0: nag...@li... Objet=A0: [Nagios-db-devel] Error loading module Hi, =A0 =A0=A0=A0 I get the following error in my nagios.log when I configure = Nagios to use the provided postgres module: =A0 [1115279003] Error: Could not load module = '/usr/local/nagios/neb/inserter.o' -> /usr/local/nagios/neb/inserter.o: = undefined symbol: BIO_new_mem_buf Also: How do I configure the module to connect to my database? Is it = hard-coded in the source? =A0 Thanks, =A0 =A0=A0=A0 Michael =A0 =A0 =A0 |
From: Michael H. <mic...@ax...> - 2005-05-10 01:25:03
|
I was eventually able to compile a module which loaded into Nagios and initialised correctly, but it complained that it wasn't able to clear the configuration. Try as I might, I just couldn't get it to work. I downloaded and installed MySQL and tried the MySQL NEB module. I had to add zlib to the list of libraries during compilation but after that it worked with no problems. Thanks to Ben and Thibault for your help, and to Matthew Kent for writing the MySQL module. Michael > -----Original Message----- > From: Ben [mailto:be...@si...]=20 > Sent: Saturday, 7 May 2005 1:15 AM > To: Michael Henry > Cc: nag...@li... > Subject: Re: [Nagios-db-devel] Error loading module >=20 > I do want to make a new release. However, I was hoping I=20 > could get some documentation into it...... unfortunately I've=20 > just been too busy to write it. >=20 > On May 5, 2005, at 4:57 PM, Michael Henry wrote: >=20 > > I modified the makefile with the correct locations of the postgres=20 > > libraries and Nagios headers for my system: > > > > all: > > gcc -Wall -g -O2 -o inserter.o inserter.c -shared -I/usr/=20 > > local/src/nagios-2.0b3/include -I/usr/local/pgsql/include /usr/lib/=20 > > libpq.a > > > > and did "make all". In hindsight the pgsql include directory did=20 > > nothing as that directory doesn't exist but the postgres=20 > header is in=20 > > /usr/include (rpm install of postgres) so it all worked out in the=20 > > end. I copied the resulting inserter.o to my nagios installation. > > > > I am using the tarball from sourceforge; I'm not a=20 > developer and don't=20 > > have CVS set up. > > > > Is there any chance that you could do a new release? Being able to=20 > > configure the module would be a really nice feature to have... :) > > > > Also if you could add a paragraph to README about how to=20 > add the NEB=20 > > module to nagios (ie use a "broker_module" directive in > > nagios.cfg) this would be appreciated. As with all things=20 > it's obvious=20 > > in hindsight but I did spend some time yesterday wondering=20 > WTF I was=20 > > supposed to do with inserter.o. > > > > Thanks! > > > > Michael > > > > > > > > From: Ben [mailto:be...@si...] > > Sent: Fri 6/05/2005 9:37 AM > > To: Michael Henry > > Cc: nag...@li... > > Subject: Re: [Nagios-db-devel] Error loading module > > > > How did you compile the module? Somebody else had a similar=20 > issue, but=20 > > they had ommited some libraries. > > > > If you pull from CVS, you can set the connection params in=20 > your nagios=20 > > config file. If you pull the most recent tarball (0.91 I=20 > believe) then=20 > > you have to modify inserter.c to change your connection settings. > > > > On Thu, 5 May 2005, Michael Henry wrote: > > > > > Hi, > > > > > > I get the following error in my nagios.log when I configure > > Nagios to use the provided postgres module: > > > > > > [1115279003] Error: Could not load module '/usr/local/nagios/neb/ > > inserter.o' -> /usr/local/nagios/neb/inserter.o: undefined symbol: =20 > > BIO_new_mem_buf > > > > > > Also: How do I configure the module to connect to my database? Is > > it hard-coded in the source? > > > > > > Thanks, > > > > > > Michael > > > > > > > > > > > > > > > > > > >=20 >=20 |
From: Ben <be...@si...> - 2005-05-11 18:37:54
|
Sorry to hear you couldn't get the postgres one to work. You wouldn't by chance remember the error you were getting? On Tue, 10 May 2005, Michael Henry wrote: > > I was eventually able to compile a module which loaded into Nagios and > initialised correctly, but it complained that it wasn't able to clear > the configuration. Try as I might, I just couldn't get it to work. > > I downloaded and installed MySQL and tried the MySQL NEB module. > I had to add zlib to the list of libraries during compilation but after > that it worked with no problems. > > Thanks to Ben and Thibault for your help, and to Matthew Kent for > writing > the MySQL module. > > Michael > > > > > -----Original Message----- > > From: Ben [mailto:be...@si...] > > Sent: Saturday, 7 May 2005 1:15 AM > > To: Michael Henry > > Cc: nag...@li... > > Subject: Re: [Nagios-db-devel] Error loading module > > > > I do want to make a new release. However, I was hoping I > > could get some documentation into it...... unfortunately I've > > just been too busy to write it. > > > > On May 5, 2005, at 4:57 PM, Michael Henry wrote: > > > > > I modified the makefile with the correct locations of the postgres > > > libraries and Nagios headers for my system: > > > > > > all: > > > gcc -Wall -g -O2 -o inserter.o inserter.c -shared -I/usr/ > > > local/src/nagios-2.0b3/include -I/usr/local/pgsql/include /usr/lib/ > > > libpq.a > > > > > > and did "make all". In hindsight the pgsql include directory did > > > nothing as that directory doesn't exist but the postgres > > header is in > > > /usr/include (rpm install of postgres) so it all worked out in the > > > end. I copied the resulting inserter.o to my nagios installation. > > > > > > I am using the tarball from sourceforge; I'm not a > > developer and don't > > > have CVS set up. > > > > > > Is there any chance that you could do a new release? Being able to > > > configure the module would be a really nice feature to have... :) > > > > > > Also if you could add a paragraph to README about how to > > add the NEB > > > module to nagios (ie use a "broker_module" directive in > > > nagios.cfg) this would be appreciated. As with all things > > it's obvious > > > in hindsight but I did spend some time yesterday wondering > > WTF I was > > > supposed to do with inserter.o. > > > > > > Thanks! > > > > > > Michael > > > > > > > > > > > > From: Ben [mailto:be...@si...] > > > Sent: Fri 6/05/2005 9:37 AM > > > To: Michael Henry > > > Cc: nag...@li... > > > Subject: Re: [Nagios-db-devel] Error loading module > > > > > > How did you compile the module? Somebody else had a similar > > issue, but > > > they had ommited some libraries. > > > > > > If you pull from CVS, you can set the connection params in > > your nagios > > > config file. If you pull the most recent tarball (0.91 I > > believe) then > > > you have to modify inserter.c to change your connection settings. > > > > > > On Thu, 5 May 2005, Michael Henry wrote: > > > > > > > Hi, > > > > > > > > I get the following error in my nagios.log when I configure > > > Nagios to use the provided postgres module: > > > > > > > > [1115279003] Error: Could not load module '/usr/local/nagios/neb/ > > > inserter.o' -> /usr/local/nagios/neb/inserter.o: undefined symbol: > > > BIO_new_mem_buf > > > > > > > > Also: How do I configure the module to connect to my dat |
From: Michael H. <mic...@ax...> - 2005-05-13 00:40:16
|
Sorry Ben I no-longer have access to the system otherwise I'd include the log here. I believe the first error was the module calling a stored procedure to clear the configuration: 135 res =3D PQexec(pgconn,"select empty_config()"); which resulted in this message being printed: 138 snprintf(q,sizeof(q),"nagios-db: couldn't clear config info (%s)", PQresultErrorMessage(res)); with an empty string from PQresultErrorMessage(). From there the log just filled with error messages until Nagios shut itself down. Thanks, Michael > -----Original Message----- > From: Ben [mailto:be...@si...]=20 > Sent: Thursday, 12 May 2005 4:38 AM > To: Michael Henry > Cc: nag...@li... > Subject: RE: [Nagios-db-devel] Error loading module >=20 > Sorry to hear you couldn't get the postgres one to work. You=20 > wouldn't by chance remember the error you were getting? >=20 > On Tue, 10 May 2005, Michael Henry wrote: >=20 > >=20 > > I was eventually able to compile a module which loaded into=20 > Nagios and=20 > > initialised correctly, but it complained that it wasn't=20 > able to clear=20 > > the configuration. Try as I might, I just couldn't get it to work. > >=20 > > I downloaded and installed MySQL and tried the MySQL NEB module. > > I had to add zlib to the list of libraries during compilation but=20 > > after that it worked with no problems. > >=20 > > Thanks to Ben and Thibault for your help, and to Matthew Kent for=20 > > writing the MySQL module. > >=20 > > Michael > >=20 > >=20 > >=20 > > > -----Original Message----- > > > From: Ben [mailto:be...@si...] > > > Sent: Saturday, 7 May 2005 1:15 AM > > > To: Michael Henry > > > Cc: nag...@li... > > > Subject: Re: [Nagios-db-devel] Error loading module > > >=20 > > > I do want to make a new release. However, I was hoping I=20 > could get=20 > > > some documentation into it...... unfortunately I've just been too=20 > > > busy to write it. > > >=20 > > > On May 5, 2005, at 4:57 PM, Michael Henry wrote: > > >=20 > > > > I modified the makefile with the correct locations of=20 > the postgres=20 > > > > libraries and Nagios headers for my system: > > > > > > > > all: > > > > gcc -Wall -g -O2 -o inserter.o inserter.c=20 > -shared -I/usr/=20 > > > > local/src/nagios-2.0b3/include -I/usr/local/pgsql/include=20 > > > > /usr/lib/ libpq.a > > > > > > > > and did "make all". In hindsight the pgsql include=20 > directory did=20 > > > > nothing as that directory doesn't exist but the postgres > > > header is in > > > > /usr/include (rpm install of postgres) so it all worked=20 > out in the=20 > > > > end. I copied the resulting inserter.o to my nagios=20 > installation. > > > > > > > > I am using the tarball from sourceforge; I'm not a > > > developer and don't > > > > have CVS set up. > > > > > > > > Is there any chance that you could do a new release?=20 > Being able to=20 > > > > configure the module would be a really nice feature to=20 > have... :) > > > > > > > > Also if you could add a paragraph to README about how to > > > add the NEB > > > > module to nagios (ie use a "broker_module" directive in > > > > nagios.cfg) this would be appreciated. As with all things > > > it's obvious > > > > in hindsight but I did spend some time yesterday wondering > > > WTF I was > > > > supposed to do with inserter.o. > > > > > > > > Thanks! > > > > > > > > Michael > > > > > > > > > > > > > > > > From: Ben [mailto:be...@si...] > > > > Sent: Fri 6/05/2005 9:37 AM > > > > To: Michael Henry > > > > Cc: nag...@li... > > > > Subject: Re: [Nagios-db-devel] Error loading module > > > > > > > > How did you compile the module? Somebody else had a similar > > > issue, but > > > > they had ommited some libraries. > > > > > > > > If you pull from CVS, you can set the connection params in > > > your nagios > > > > config file. If you pull the most recent tarball (0.91 I > > > believe) then > > > > you have to modify inserter.c to change your connection=20 > settings. > > > > > > > > On Thu, 5 May 2005, Michael Henry wrote: > > > > > > > > > Hi, > > > > > > > > > > I get the following error in my nagios.log when I=20 > configure > > > > Nagios to use the provided postgres module: > > > > > > > > > > [1115279003] Error: Could not load module=20 > > > > > '/usr/local/nagios/neb/ > > > > inserter.o' -> /usr/local/nagios/neb/inserter.o:=20 > undefined symbol: =20 > > > > BIO_new_mem_buf > > > > > > > > > > Also: How do I configure the module to connect to my dat >=20 >=20 >=20 |
From: Ben <be...@si...> - 2005-05-06 15:14:50
|
I do want to make a new release. However, I was hoping I could get some documentation into it...... unfortunately I've just been too busy to write it. On May 5, 2005, at 4:57 PM, Michael Henry wrote: > I modified the makefile with the correct locations of the postgres > libraries and Nagios headers for my system: > > all: > gcc -Wall -g -O2 -o inserter.o inserter.c -shared -I/usr/ > local/src/nagios-2.0b3/include -I/usr/local/pgsql/include /usr/lib/ > libpq.a > > and did "make all". In hindsight the pgsql include directory did > nothing as that directory doesn't exist but the postgres header is > in /usr/include (rpm install of postgres) so it all worked out in > the end. I copied the resulting inserter.o to my nagios installation. > > I am using the tarball from sourceforge; I'm not a developer and > don't have CVS set up. > > Is there any chance that you could do a new release? Being able to > configure the module would be a really nice feature to have... :) > > Also if you could add a paragraph to README about how to add the > NEB module to nagios (ie use a "broker_module" directive in > nagios.cfg) this would be appreciated. As with all things it's > obvious in hindsight but I did spend some time yesterday wondering > WTF I was supposed to do with inserter.o. > > Thanks! > > Michael > > > > From: Ben [mailto:be...@si...] > Sent: Fri 6/05/2005 9:37 AM > To: Michael Henry > Cc: nag...@li... > Subject: Re: [Nagios-db-devel] Error loading module > > How did you compile the module? Somebody else had a similar issue, but > they had ommited some libraries. > > If you pull from CVS, you can set the connection params in your nagios > config file. If you pull the most recent tarball (0.91 I believe) > then you > have to modify inserter.c to change your connection settings. > > On Thu, 5 May 2005, Michael Henry wrote: > > > Hi, > > > > I get the following error in my nagios.log when I configure > Nagios to use the provided postgres module: > > > > [1115279003] Error: Could not load module '/usr/local/nagios/neb/ > inserter.o' -> /usr/local/nagios/neb/inserter.o: undefined symbol: > BIO_new_mem_buf > > > > Also: How do I configure the module to connect to my database? Is > it hard-coded in the source? > > > > Thanks, > > > > Michael > > > > > > > > > > > |