Hey all,for anyone who might me thinking about answering, I solved the issue. Turns out I'd forgotten this was a 64 buts machine, and even though I set "--with-mysql-lib" which solved the issues to many other users, I sued /usr/lib/mysql instead of /usr/lib64/mysql. Using this second choice solved the segmentation faults!
Thanks anyway, -------- Mensagem Original -------- Assunto: Segmentation Fault with NDOUtils Data: Wed, 14 Apr 2010 18:26:39 +0100 De: Daniel Gomes <dgo...@ipfn.ist.utl.pt> Para: nagios-users@lists.sourceforge.net Dear list members, I've been trying to get NDOutils to work so I can use a MySQL backend (and later Centreon, but that's a different story). Before I forget, this is a Ubuntu Hardy (8.04.4) running Nagios 3.2.1, Nagios Plugins 1.4.14 and NDOUtils 1.4b9. I am installing everything from the source files, with explations provided on some tutorials I found. The basic Nagios installation is working fine, I can access the Web GUI and view the stats for my local machine. After having this setup, I moved on to trying to get NDOUtils to work. After some troubles trying to find the MySQL libs etc, I tried with the default configuration, UNIX sockets, which yielded some problems. So I then tried TCP sockets, which is the current configuration. So, as for ndo2db.cfg (the MySQL data is all tested - I manually connected with the said user and was able to insert and delete rows into a nagios_* table): # grep -v '^#' ndo2db.cfg | grep -v '^$' lock_file=/usr/local/nagios/var/ndo2db.lock ndo2db_user=nagios ndo2db_group=nagios socket_type=tcp socket_name=/usr/local/nagios/var/ndo.sock tcp_port=5668 use_ssl=0 db_servertype=mysql db_host=XXX db_port=3306 db_name=nagiosdb db_prefix=nagios_ db_user=nagios db_pass=XXX max_timedevents_age=1440 max_systemcommands_age=10080 max_servicechecks_age=10080 max_hostchecks_age=10080 max_eventhandlers_age=44640 max_externalcommands_age=44640 debug_level=-1 debug_verbosity=2 debug_file=/var/log/ndo2db.debug max_debug_file_size=1000000 ------------------------------ (and by the way, like some other people I found on other pages, I can't get any info to show up on /var/log/ndo2db.debug) I am able to start ndo2sql (I'm using a custom script I found on some tutorial, I can post it if you'd like) and the proof that all is working is: # netstat -plane | grep 5668 tcp 0 0 0.0.0.0:5668 0.0.0.0:* LISTEN 1012 1231363 32676/ndo2db As I mentioned, nothing (good or bad) gets written to the debug file. ------------------------------ On to nagios.cfg (I guess these are the only important fields): # grep -v "#" nagios.cfg | grep broker event_broker_options=-1 broker_module=/usr/local/nagios/bin/ndomod.o config_file=/usr/local/nagios/etc/ndomod.cfg And finally ndomod.cfg: # grep -v '^#' /usr/local/nagios/etc/ndomod.cfg | grep -v '^$' instance_name=default output_type=tcpsocket output=127.0.0.1 tcp_port=5668 use_ssl=0 output_buffer_items=5000 buffer_file=/usr/local/nagios/var/ndomod.tmp file_rotation_interval=14400 file_rotation_timeout=60 reconnect_interval=15 reconnect_warning_interval=15 data_processing_options=-1 config_output_options=2 Starting nagios just says "done" without errors/warnings, but checking the logs (/var/log/nagios.log): [1271265751] Nagios 3.2.1 starting... (PID=520) [1271265751] Local time is Wed Apr 14 18:22:31 WEST 2010 [1271265751] LOG VERSION: 2.0 [1271265751] ndomod: NDOMOD 1.4b9 (10-27-2009) Copyright (c) 2009 Nagios Core Development Team and Community Contributors [1271265751] ndomod: Successfully connected to data sink. 54 queued items to flush. [1271265751] ndomod: Successfully flushed 54 queued items to data sink. [1271265751] Event broker module '/usr/local/nagios/bin/ndomod.o' initialized successfully. [1271265751] Finished daemonizing... (New PID=522) [1271265752] ndomod: Error writing to data sink! Some output may get lost... [1271265752] ndomod: Please check remote ndo2db log, database connection or SSL Parameters [1271265768] ndomod: Successfully reconnected to data sink! 0 items lost, 86 queued items to flush. [1271265768] ndomod: Successfully flushed 86 queued items to data sink. [1271265768] ndomod: Error writing to data sink! Some output may get lost... [1271265768] ndomod: Please check remote ndo2db log, database connection or SSL Parameters [1271265784] ndomod: Successfully reconnected to data sink! 0 items lost, 82 queued items to flush. [1271265784] ndomod: Successfully flushed 82 queued items to data sink. [1271265784] ndomod: Error writing to data sink! Some output may get lost... [1271265784] ndomod: Please check remote ndo2db log, database connection or SSL Parameters [1271265800] ndomod: Successfully reconnected to data sink! 0 items lost, 85 queued items to flush. [1271265800] ndomod: Successfully flushed 85 queued items to data sink. [1271265800] ndomod: Error writing to data sink! Some output may get lost... [1271265800] ndomod: Please check remote ndo2db log, database connection or SSL Parameters Still nothing on the ndo2db debug log, and checking the syslog: Apr 14 18:22:31 silver nagios: Event broker module '/usr/local/nagios/bin/ndomod.o' initialized successfully. Apr 14 18:22:31 silver nagios: Finished daemonizing... (New PID=522) Apr 14 18:22:31 silver kernel: [694704.043377] ndo2db[521]: segfault at 7fff1da10ff8 rip 7f9615464696 rsp 7fff1da11000 error 6 Apr 14 18:22:32 silver nagios: ndomod: Error writing to data sink! Some output may get lost... Apr 14 18:22:32 silver nagios: ndomod: Please check remote ndo2db log, database connection or SSL Parameters Apr 14 18:22:48 silver kernel: [694720.308001] ndo2db[535]: segfault at 7fff1da10ff8 rip 7f9615464696 rsp 7fff1da11000 error 6 Apr 14 18:22:48 silver nagios: ndomod: Successfully reconnected to data sink! 0 items lost, 86 queued items to flush. Apr 14 18:22:48 silver nagios: ndomod: Successfully flushed 86 queued items to data sink. Apr 14 18:22:48 silver nagios: ndomod: Error writing to data sink! Some output may get lost... Apr 14 18:22:48 silver nagios: ndomod: Please check remote ndo2db log, database connection or SSL Parameters And so on, with several more segfaults... If it helps for anything, setting the output_type for file seems to work well, with the file getting written. Can ndo2db read this file? For me it really doesn't matter which type of output I use, so long as it works... Thanks in advance, -- Daniel Gomes (SysAdmin) dgo...@ipfn.ist.utl.pt Ext. 3487 - 218419487 Instituto de Plasmas e Fusão Nuclear Instituto Superior Técnico - UTL Av. Rovisco Pais - 1049-001 Lisboa - Portugal -- Daniel Gomes (SysAdmin) dgo...@ipfn.ist.utl.pt Ext. 3487 - 218419487 Instituto de Plasmas e Fusão Nuclear Instituto Superior Técnico - UTL Av. Rovisco Pais - 1049-001 Lisboa - Portugal
------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev
_______________________________________________ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null