I assume, as you have said, that /usr/local/nagios/var/ndo.sock has write permissions for the user/group that Nagios daemon runs as.<br><br>In the file src/io.c, line 225, is the function ndo_sink_write, wich is returning the value NDO_ERROR and causing the function ndomod_write_to_sink in file src/ndomod.c to log the error "<span><font face="Arial" size="2">Error writing to data sink!" (that same function is also the one that succesfully reconnects to data sink).</font></span><br>
<br>Maybe you can get more info about the problem, examining the errno variable after the "write" call in ndo_sink_write. You can modify the line 733 in ndomod.c for something like this:<br><br>asprintf(&temp_buffer,"ndomod: Error writing to data sink (%d - %s)!  Some output may get lost.  %lu queued items to flush.",errno,strerror(errno), sinkbuf.items);<br>
<br>The function strerror gives you a very short description of the error, and is defined in string.h<br><br>The error codes should be defined in /usr/include/asm-generic/errno.h<br><br>If the permissions are ok (which seems to be the case due to the unix socket being opened for writing succesfully), maybe there is a problem with ndo2db disconnecting for some reason in the other extreme of the socket.<br>
<br>You can also use netstat -a to see if the ndo2db daemon is listening on the specified socket, before and after getting up nagios.<br><br>Also, I think that the ndo2db daemon should at least log a query like "SELECT instance_id FROM ...", which is one of the first things that ndo2db does after connecting to the database (in ndo2db_db_hello() in src/db.c), so maybe it's the ndo2db daemon failing to connect to database (or to listen on the unix socket).<br>
<br>The function that connects to the database is ndo2db_db_connect, which sends (un)success messages to syslog.<br><br>Well, I've no more ideas at the moment.<br><br><br><br><br><br><div><span class="gmail_quote">2008/4/4, Joe Precious <<a href="mailto:JoeP@protronics.co.uk">JoeP@protronics.co.uk</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">









<div link="blue" vlink="purple" lang="EN-GB">

<div>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">Config files are below.  I always get the errors – nothing has
been written to the database yet (NDOUtils was installed yesterday morning).</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">Thanks</span></p><span class="q">

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">ndomod.cfg:-</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">instance_name=default</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">output_type=unixsocket</span></p>

</span><p><span style="font-size: 11pt; color: rgb(31, 73, 125);">output=/usr/local/nagios/var/ndo.sock</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">tcp_port=5668</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">output_buffer_items=5000</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">buffer_file=/usr/local/nagios/var/ndomod.tmp</span></p><span class="q">

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">file_rotation_interval=14400</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">file_rotation_timeout=60</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">reconnect_interval=15</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">reconnect_warning_interval=15</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">data_processing_options=-1</span></p>

</span><p><span style="font-size: 11pt; color: rgb(31, 73, 125);">config_output_options=2</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">ndo2db.cfg:-</span></p><span class="q">

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">ndo2db_user=nagios</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">ndo2db_group=nagios</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">socket_type=unix</span></p>

</span><p><span style="font-size: 11pt; color: rgb(31, 73, 125);">socket_name=/usr/local/nagios/var/ndo.sock</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">tcp_port=5668</span></p><span class="q">

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">db_servertype=mysql</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">db_host=localhost</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">db_port=3306</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">db_name=nagios</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">db_prefix=nagios_</span></p>

</span><p><span style="font-size: 11pt; color: rgb(31, 73, 125);">db_user=nagios</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">db_pass=<Removed></span></p><span class="q">

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">max_timedevents_age=1440</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">max_systemcommands_age=10080</span></p>

</span><p><span style="font-size: 11pt; color: rgb(31, 73, 125);">max_servicechecks_age=10080</span></p><span class="q">

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">max_hostchecks_age=10080</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">max_eventhandlers_age=44640</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">debug_level=-1</span></p>

</span><p><span style="font-size: 11pt; color: rgb(31, 73, 125);">debug_verbosity=2</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">debug_file=/var/log/ndo2db.debug</span></p><span class="q">

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">max_debug_file_size=1000000</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>

</span><div style="border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0cm 0cm;">

<p style="margin-left: 36pt;"><b><span style="font-size: 10pt;" lang="EN-US">From:</span></b><span style="font-size: 10pt;" lang="EN-US">
<a href="mailto:nagios-users-bounces@lists.sourceforge.net" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">nagios-users-bounces@lists.sourceforge.net</a>
[mailto:<a href="mailto:nagios-users-bounces@lists.sourceforge.net" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">nagios-users-bounces@lists.sourceforge.net</a>] <b>On Behalf Of </b>Antonio
Grassi<br>
<b>Sent:</b> 04 April 2008 15:21<span class="q"><br>
<b>To:</b> <a href="mailto:Nagios-users@lists.sourceforge.net" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Nagios-users@lists.sourceforge.net</a><br>
<b>Subject:</b> Re: [Nagios-users] RE : NDOUtils Problem</span></span></p>

</div><span class="q">

<p style="margin-left: 36pt;"> </p>

<p style="margin-right: 0cm; margin-bottom: 12pt; margin-left: 36pt;">Joe, can you please paste your ndomod.cfg and
ndo2db.cfg files (without comments)?<br>
<br>
</p>

<div>

<p style="margin-left: 36pt;"><span>2008/4/4,
Joe Precious <<a href="mailto:JoeP@protronics.co.uk" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">JoeP@protronics.co.uk</a>>:</span></p>

<div>

<div>

<p style="margin-left: 36pt;"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Hi</span></p>

<p style="margin-left: 36pt;"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>

<p style="margin-left: 36pt;"><span style="font-size: 11pt; color: rgb(31, 73, 125);">I've
enabled logging and it creates the debug file but there's nothing in it which
implies to me that ndo2db is not actually doing anything at all.  I guess
this ties in with the errors that imply that ndomod can't connect to the
socket.</span></p>

<p style="margin-left: 36pt;"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>

<p style="margin-left: 36pt;"><span style="font-size: 11pt; color: rgb(31, 73, 125);">I've
checked the location of the socket in both configuration files is the same,
I've also confirmed it exists where it should and the permissions look fine on
it (the same as my other server where it works).</span></p>

<p style="margin-left: 36pt;"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>

<p style="margin-left: 36pt;"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Is
there anyway I can test the connection to the socket?  This is starting to
get a bit beyond my Linux knowledge.</span></p>

<p style="margin-left: 36pt;"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>

<p style="margin-left: 36pt;"><span style="font-size: 11pt; color: rgb(31, 73, 125);">BTW
I upgraded to 3.0.1 in case this helped but it didn't!</span></p>

<p style="margin-left: 36pt;"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>

<p style="margin-left: 36pt;"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Thanks</span></p>

<p style="margin-left: 36pt;"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>

<p style="margin-left: 36pt;"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Joe</span></p>

<p style="margin-left: 36pt;"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>

<div style="border-style: solid none none; border-color: -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0cm 0cm;">

<p style="margin-left: 72pt;"><b><span style="font-size: 10pt;" lang="EN-US">From:</span></b><span style="font-size: 10pt;" lang="EN-US"> <a href="mailto:nagios-users-bounces@lists.sourceforge.net" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">nagios-users-bounces@lists.sourceforge.net</a>
[mailto:<a href="mailto:nagios-users-bounces@lists.sourceforge.net" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">nagios-users-bounces@lists.sourceforge.net</a>] <b>On Behalf Of
</b>Antonio Grassi<br>
<b>Sent:</b> 04 April 2008 13:19<br>
<b>To:</b> <a href="mailto:Nagios-users@lists.sourceforge.net" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Nagios-users@lists.sourceforge.net</a><br>
<b>Subject:</b> Re: [Nagios-users] RE : NDOUtils Problem</span></p>

</div>

</div>

</div>

</div>

</span></div>

</div>


<br>-------------------------------------------------------------------------<br>
Check out the new SourceForge.net Marketplace.<br>
It's the best place to buy or sell services for<br>
just about anything Open Source.<br>
<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace" target="_blank">http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace</a><br>
_______________________________________________<br>
Nagios-users mailing list<br>
<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a><br>
<a onclick="return top.js.OpenExtLink(window,event,this)" href="https://lists.sourceforge.net/lists/listinfo/nagios-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-users</a><br>
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.<br>
::: Messages without supporting info will risk being sent to /dev/null<br></blockquote></div><br>