<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 11 March 2015 at 14:18, Vernon Everett <span dir="ltr"><<a href="mailto:everett.vernon@gmail.com" target="_blank">everett.vernon@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><div>About now, I am getting a little nervous adding send and expect, because unlike telnet and telnets, we are doing ldap and ldaps testing.<br></div></div></div></blockquote><div><br></div><div>That's understandable.  A read through the code suggests that at least in some places, an empty string is equivalent to an undefined string, as the string length (shown in Sendlen in the debug output) is zero in both cases.  So until a patch is in place, a work-around might be to define empty "send" and "expect" strings for those that have none.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><div></div></div><div>Any suggestions?<br></div><div>I think we have some debug code update recommendations for JC though. :-)</div></div></blockquote><div><br></div><div> Here's my patch.  I'll push this into the dev list for proposed inclusion in a future release.</div><div><br></div><div><div>--- lib/netservices.c.orig      2012-07-25 01:48:41.000000000 +1000</div><div>+++ lib/netservices.c   2015-03-12 11:18:18.000000000 +1100</div><div>@@ -328,9 +328,9 @@</div><div>        dbgprintf("Service list dump\n");</div><div>        for (i=0; (svcinfo[i].svcname); i++) {</div><div>                dbgprintf(" Name      : %s\n", svcinfo[i].svcname);</div><div>-               dbgprintf("   Sendtext: %s\n", binview(svcinfo[i].sendtxt, svcinfo[i].sendlen));</div><div>+               dbgprintf("   Sendtext: %s\n", svcinfo[i].sendtxt!=NULL?binview(svcinfo[i].sendtxt, svcinfo[i].sendlen):"[null]");</div><div>                dbgprintf("   Sendlen : %d\n", svcinfo[i].sendlen);</div><div>-               dbgprintf("   Exp.text: %s\n", binview(svcinfo[i].exptext, svcinfo[i].explen));</div><div>+               dbgprintf("   Exp.text: %s\n", svcinfo[i].exptext!=NULL?binview(svcinfo[i].exptext, svcinfo[i].explen):"[null]");</div><div>                dbgprintf("   Exp.len : %d\n", svcinfo[i].explen);</div><div>                dbgprintf("   Exp.ofs : %d\n", svcinfo[i].expofs);</div><div>                dbgprintf("   Flags   : %d\n", svcinfo[i].flags);</div></div><div><br></div><div>This produces "[null]" where we would have seen "(null)" on a GNU-based OS, to differentiate between the two situations.</div><div><br></div><div>In the mean time, you could compile a special version of xymond_rrd, and run it manually on the same data channel as the real one, but have it make RRD files and log file to a different location.  This shouldn't interfere with your production Xymon.  Here's one I prepared earlier that works for me:</div><div><br></div><div>sudo -u xymon mkdir /tmp/my-rrd-data/</div><div>sudo -u xymon xymoncmd /bin/sh -c 'XYMONTMP=/tmp; /usr/lib/xymon/server/bin/xymond_channel --channel=data --log=/tmp/my-rrd-data.log /path/to/xymond_rrd_debug_patch --rrddir=/tmp/my-rrd-data/ --debug'<br></div><div><br></div><div>This seems to show some really useful stuff that's relevant to solving your problem.  Some sample debug lines:</div><div><br></div><div><div>15306 2015-03-12 11:36:28 xymond_rrd_debug_patch: Got message 165619 @@data#165619/servername|1426120588.401891|172.16.0.1||servername|vmstat|sunos|ABC</div></div><div>...</div><div><div>15306 2015-03-12 11:36:28 Creating rrd /tmp/my-rrd-data//servername/vmstat.rrd</div><div>15306 2015-03-12 11:36:28 RRD create param 00: 'rrdcreate'</div><div>15306 2015-03-12 11:36:28 RRD create param 01: '/tmp/my-rrd-data//servername/vmstat.rrd'</div><div>15306 2015-03-12 11:36:28 RRD create param 02: '-s'</div><div>15306 2015-03-12 11:36:28 RRD create param 03: '300'</div><div>15306 2015-03-12 11:36:28 RRD create param 04: 'DS:cpu_r:GAUGE:600:0:U'</div><div>15306 2015-03-12 11:36:28 RRD create param 05: 'DS:cpu_b:GAUGE:600:0:U'</div><div>15306 2015-03-12 11:36:28 RRD create param 06: 'DS:cpu_w:GAUGE:600:0:U'</div></div><div>...</div><div><div>15306 2015-03-12 11:39:42 Got 265 bytes</div><div>15306 2015-03-12 11:39:42 xymond_rrd_debug_patch: Got message 165737 @@data#165737/servername|1426120782.080244|172.16.0.2||servername|trends||DEF</div><div>15306 2015-03-12 11:39:42 startpos 216644, fillpos 216644, endpos -1</div><div>15306 2015-03-12 11:39:42 Flushing '/servername/tcp.xopiy90404.parameter.rrd' with 1 updates pending, template 'sec'</div><div>15306 2015-03-12 11:39:42 Want msg 165738, startpos 216644, fillpos 216644, endpos -1, usedbytes=0, bufleft=1884603</div></div><div><br></div><div>J</div><div><br></div></div></div></div>