[Nagios-db-devel] Segfaults with the postgres ned
Status: Beta
Brought to you by:
bench23
From: Tim V. <dj...@ro...> - 2005-01-14 13:30:53
|
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 |