Re: [Nagios-db-devel] Segfaults with the postgres ned
Status: Beta
Brought to you by:
bench23
From: Ben <be...@si...> - 2005-01-14 17:00:46
|
Well, first of, thanks, and second off, that sucks. Can you tell me a little bit about your environment? Perhaps that might help explain things. I'd like to keep things as simple as possible, so I'm hesitant to make the database insertion happen by calling another layer. Yes, it would give more flexibility to how data gets inserted, but really, that process should almost never change once working, and it would also give another point of failure, another potential bottleneck, and certainly more latency in insertions. The fact that querify() doesn't work and that PQclear crashes your system leads me to think that you may be having problems with your postgres libs, because querify() does call PQescapeString() before it writes the final '. What libs are you linking against? On Jan 14, 2005, at 5:30 AM, Tim Verhoeven wrote: > Hi guys, > > First a word of thanks for so quickly creating these database plugins > for Nagios 2. I'm also converting our monitoring infrastructure from a > old netsaint to nagios 2. And for certain things like reports we need > the databse integration. > > So I've been trying to get your module to work. But I can't get it to > run. I always get a segfault. I'm currently trying it to work with > postgres 7.3.4. I first found out that the querify function was not > working. All strings were missing the final '. So I just removed the > piece of code that sets them and added them myself to the printf > statements. That fixed the first segfault. > > Then I'm still getting a segfault at the PQclear at the end of the > processtatus function. And I'm unable to find out why. The status of > the query is ok, no error. > > Getting a bit frustated about not being able to test and help out with > this I've had another idea. Why not change the code/ add a 3 > module/... to call external PHP code that does the actual DB work. It > is pretty simple to make commands out of PHP code (see pear for > example). > > This would allow at the beginning to test and develop much faster > since no recompiles are needed. Just chaning the PHP code is enough. > And with PHP you can also very easy do DB abstraction and that kind of > stuff. > Then later, when the code is stable enough, you can port the PHP code > to C to gain performance. > > So, what do you think ? Is it worth the effort ? Else I look for other > people to help my find out why the segfault and maybe help with > abstracting the DB code in the UI. > > Kind regards, > Tim > > -- > Tim Verhoeven - dj...@ro... - 0479 / 88 11 83 > > /* This is total bullshit: */ > linux-2.6.6/drivers/video/sis/init301.c > > > > ------------------------------------------------------- > The SF.Net email is sponsored by: Beat the post-holiday blues > Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. > It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt > _______________________________________________ > Nagios-db-devel mailing list > Nag...@li... > https://lists.sourceforge.net/lists/listinfo/nagios-db-devel |