NDOUtils 1.4b7 data sink write errors

I’ve searched and tried to find a solution to this problem to no avail. I’m trying to get ndoutils to run so that I can install NPC. (trac2.assembla.com/npc) Everything looks to be setup right, but nothing is getting written to the mysql tables. The error:

[1226661529] ndomod: Successfully reconnected to data sink! 0 items lost, 798 queued items to flush. [1226661529] ndomod: Error writing to data sink! Some output may get lost. 367 queued items to flush. [1226661545] ndomod: Successfully reconnected to data sink! 0 items lost, 518 queued items to flush. [1226661545] ndomod: Successfully flushed 518 queued items to data sink. [1226661545] ndomod: Error writing to data sink! Some output may get lost... [1226661561] ndomod: Successfully reconnected to data sink! 0 items lost, 163 queued items to flush. [1226661561] ndomod: Successfully flushed 163 queued items to data sink. [1226661561] ndomod: Error writing to data sink! Some output may get lost...

My machine’s configuration, in case these details matter

Centos 5.2 64bit mysql 5.0.45 Nagios 3.03 NDOutils 1.4b7

I can login and create/modify tables with the credentials given in ndo2db.cfg. Is there something obvious I’m missing here?

hello,

were you able to fix that , can you please update us

I currently am having the same problem. Any suggestions?

ShaggySS & Shahbour, are you still referring to version 1.4b7? Or to a more recent version?

I have ndoutils-1.4b7

My error is a little differet…
[1231166488] ndomod: Still unable to connect to data sink. 9346 items lost, 5000 queued items to flush.
[1231166504] ndomod: Still unable to connect to data sink. 9428 items lost, 5000 queued items to flush.
[1231166520] ndomod: Still unable to connect to data sink. 9522 items lost, 5000 queued items to flush.
[1231166536] ndomod: Still unable to connect to data sink. 9596 items lost, 5000 queued items to flush.

EDIT*
Resolved. I changed the socket from tcp like the directions told me to unix and it appears to be working

Perhaps upgrading to version NPC 2.0.0b (Build 164), which seems to be the current recommended version, will also fix some problems?

Hey guys. I am the NPC author. Just made my way to these forums today and noticed the post. If you are still having any trouble with ndo2db or NPC let me know and I will try to give you a hand.

Cheers,
Billy

[quote=“divagater”]Hey guys. I am the NPC author. Just made my way to these forums today and noticed the post. If you are still having any trouble with ndo2db or NPC let me know and I will try to give you a hand.

Cheers,
Billy[/quote]

I am having this problem with ndo as original poster, it connects but fails to put data in the mysql db.

ndomod: Successfully reconnected to data sink! 0 items lost, 163 queued items to flush.
ndomod: Successfully flushed 163 queued items to data sink.
ndomod: Error writing to data sink! Some output may get lost…

I had nagios and cacti set up on a test box for a month or so working fine, and this week have been trying to add the NPC plugin to cacti which I have added and it shows up, etc but no data due to the ndo not putting the nagios data in the SQL database.

The SQL database exists and I can read it, view the tables, etc but no data from nagios via ndomon / ndo2db is making it over.

I have double checked my ndomon.cfg and ndo2db.cfg files, the ndoutil compilation, etc and am not sure where the problem is with nagios and ndo. I get nothing in the ndo2db debug file and have tried using both the tcp and unix port methods with no change.

My versions are Nagios 3.06 and NDOutils 1.4b7 on Fedora 9. I don’t think this is a npc issue per say as the data has to go into the mysql db first from ndomon and ndo2db.

When compiling NDOutils 1.4b7 (tried various options), it saids no next to the mysql_connect line, is this a problem and how to fix?
**
BTW, after posting this I download and compiled NDOUtils 1.4b6 and am getting some data in the SQL database now and infoo shows up in NPC tab in Cacti. I still see no hosts or services listed, is there process to dump nagios data to SQL so NTP is populated?**

Well, my success was shortlived, shortly after it appeared to be working, NDOMON killed itself due to version mismatch issue.

From Log:

ndomod: I’ve been compiled with support for revision 306 of the internal Nagios object structures, but the Nagios daemon is currently using revision 307. I’m going to unload so I don’t cause any problems…

So, any one have ideas on NDOUtil 1.4b7 and mysql_connect? That was not in the output from the 14b6 configure output.

Thanks for anyone who has ideas.

mysql Ver 14.12 Distrib 5.0.51a,

NDOUtil 1.4b7 configure results:

# ./configure --prefix=/usr/local/nagios --enable-mysql --with-mysql-lib=/usr/lib/mysql --disable-pgsql
checking for a BSD-compatible install... /usr/bin/install -c
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking whether make sets $(MAKE)... yes
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking whether time.h and sys/time.h may both be included... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking ctype.h usability... yes
checking ctype.h presence... yes
checking for ctype.h... yes
checking dirent.h usability... yes
checking dirent.h presence... yes
checking for dirent.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking float.h usability... yes
checking float.h presence... yes
checking for float.h... yes
checking getopt.h usability... yes
checking getopt.h presence... yes
checking for getopt.h... yes
checking grp.h usability... yes
checking grp.h presence... yes
checking for grp.h... yes
checking for inttypes.h... (cached) yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking ltdl.h usability... yes
checking ltdl.h presence... yes
checking for ltdl.h... yes
checking math.h usability... yes
checking math.h presence... yes
checking for math.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking pwd.h usability... yes
checking pwd.h presence... yes
checking for pwd.h... yes
checking regex.h usability... yes
checking regex.h presence... yes
checking for regex.h... yes
checking signal.h usability... yes
checking signal.h presence... yes
checking for signal.h... yes
checking socket.h usability... no
checking socket.h presence... no
checking for socket.h... no
checking stdarg.h usability... yes
checking stdarg.h presence... yes
checking for stdarg.h... yes
checking for stdint.h... (cached) yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking sys/ipc.h usability... yes
checking sys/ipc.h presence... yes
checking for sys/ipc.h... yes
checking sys/mman.h usability... yes
checking sys/mman.h presence... yes
checking for sys/mman.h... yes
checking sys/msg.h usability... yes
checking sys/msg.h presence... yes
checking for sys/msg.h... yes
checking sys/poll.h usability... yes
checking sys/poll.h presence... yes
checking for sys/poll.h... yes
checking sys/resource.h usability... yes
checking sys/resource.h presence... yes
checking for sys/resource.h... yes
checking sys/sendfile.h usability... yes
checking sys/sendfile.h presence... yes
checking for sys/sendfile.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking for sys/stat.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/timeb.h usability... yes
checking sys/timeb.h presence... yes
checking for sys/timeb.h... yes
checking for sys/types.h... (cached) yes
checking sys/un.h usability... yes
checking sys/un.h presence... yes
checking for sys/un.h... yes
checking for sys/wait.h... (cached) yes
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h... yes
checking tcpd.h usability... no
checking tcpd.h presence... no
checking for tcpd.h... no
checking for unistd.h... (cached) yes
checking values.h usability... yes
checking values.h presence... yes
checking for values.h... yes
checking for an ANSI C-conforming const... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for mode_t... yes
checking for pid_t... yes
checking for size_t... yes
checking return type of signal handlers... void
checking for uid_t in sys/types.h... yes
checking type of array argument to getgroups... gid_t
checking for int... yes
checking size of int... 4
checking for short... yes
checking size of short... 2
checking for long... yes
checking size of long... 4
checking for uint32_t... yes
checking for u_int32_t... yes
checking for int32_t... yes
checking for getopt_long... yes
checking for main in -lnsl... yes

checking for socket in -lsocket... no                *******
checking for main in -lwrap... no                     ******

checking for strdup... yes
checking for strstr... yes
checking for strtoul... yes
checking for initgroups... yes
checking for strtof... yes
checking for type of socket size... size_t
checking for linker flags for loadable modules... -shared
checking for compress in -lz... yes
checking for mysql_store_result in -lmysqlclient... yes

checking for mysql_connect in -lmysqlclient... no                      *****

checking mysql/mysql.h usability... yes
checking mysql/mysql.h presence... yes
checking for mysql/mysql.h... yes
MySQL library and include file(s) were found!
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating subst
config.status: creating include/config.h
config.status: include/config.h is unchanged

*** Configuration summary for ndoutils 1.4b7 10-31-2007 ***:

 General Options:
 -------------------------
 NDO2DB user:    nagios
 NDO2DB group:   nagios

Anyone know of a way to debug ndo?

Thanks.

Well, this started to work with 1.4b7 for me. I think it was due to maybe not having libtools library which I added when I tried 1.4b6 tools and noticed it in the configure log as saying no for that. And after I got ndomod 1.4b6 to work with ndo2db and go to the SQL database fine for a bit. When ndomod quit and gave log error about wrong version, etc I copied the ndomod and ndo2db from 1.4b7 back to the nagios bin folder and ndomod and ndo2db have been working since even after server reboot, several nagios restarts, etc. Current data is showing up in NPC fine also.

Still haven’t resolved the mysql_connect saying no in the configure log, not sure if it is a big deal though now.

data sink error solution:

the 1.4b7 tar version I believe has a bug in it. After I downloaded it directly from CVS… can’t find the CVS link though at the moment. It worked for me, no more data sink errors… I will post the CVS string if I can find it.

Thanks, Eva

here is the cvs path:

cvs -d:pserver:[email protected]:/cvsroot/nagios login
cvs -z3 -d:pserver:[email protected]:/cvsroot/nagios co ndoutils