<div dir="ltr">Just giving a follow-up for those interested or affected by this.<div><br></div><div>I believe I'm closer to understanding this problem. I've setup two "while" loops on the server, one that runs "netstat -nl | grep :22" every second, and the other that runs "ss -ln|grep :22" every second. In the former case, I get output most of the time, but I get no output about 3-6 times every couple of hours. In the latter case, I always get the expected output. This suggests to me that netstat is not doing the right thing, possibly due to a race condition that is exacerbated under load.<div><br></div></div><div>Ultimately, it's not a Xymon problem at all, it would seem. A Xymon fix might be to modify xymonclient-linux.sh to use "ss" instead of "netstat", but he output formats are different, and it would require the parser to be re-written or enhanced. Instead, I should get netstat fixed.</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 8 July 2017 at 08:32, Jeremy Laidman <span dir="ltr"><<a href="mailto:jlaidman@rebel-it.com.au" target="_blank">jlaidman@rebel-it.com.au</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div>Yes, I do the network test also. This means I could just disable 22 in the port test, and rely on the network test. It's an adequate work-around in this case. Thanks.</div><div dir="auto"><br></div><div dir="auto">I'd still like to know why it's a problem.</div><span class="HOEnZb"><font color="#888888"><div dir="auto"><br></div></font></span><div dir="auto"><span class="HOEnZb"><font color="#888888">J</font></span><div><div class="h5"><br><div class="gmail_extra" dir="auto"><br><div class="gmail_quote">On 8 Jul. 2017 04:08, "Mike Burger" <<a href="mailto:mburger@bubbanfriends.org" target="_blank">mburger@bubbanfriends.org</a>> wrote:<br type="attribution"><blockquote class="m_7940448321645396498quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="font-size:10pt;font-family:Verdana,Geneva,sans-serif"><div class="m_7940448321645396498elided-text">
<p>On 2017-07-07 2:51 am, Jeremy Laidman wrote:</p>
<blockquote type="cite" style="padding:0 0.4em;border-left:#1010ff 2px solid;margin:0">
<div dir="ltr">Not much chance, really. This was my first guess at the cause. The [ports] section appears complete (doesn't have its own limit as far as I know), the [clock] section is present at the end, and the UTC: datestamp line is present as the last line. Hence no artefacts I would expect to see when truncation takes place.
<div> </div>
<div>Also, the client messages are less than 300kB, whereas the default limit is 512kB and I've bumped that up to 2MB.</div>
<div> </div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On 7 July 2017 at 15:05, Ryan Novosielski <span><<a href="mailto:novosirj@rutgers.edu" target="_blank">novosirj@rutgers.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="auto">
<div>Any chance this is truncation happening? That test can have a lot of output.<br><br><span style="background-color:rgba(255,255,255,0)">--<br> ____<br> || \\UTGERS,       |---------------------------*O<wbr>*---------------------------<br> ||_// the State     |         Ryan Novosielski - <a dir="ltr" href="mailto:novosirj@rutgers.edu" target="_blank">novosirj@rutgers.edu</a><br> || \\ University | Sr. Technologist - 973/972.0922 (2x0922) ~*~ RBHS Campus<br> ||  \\    of NJ     | Office of Advanced Research Computing - MSB C630, Newark<br>     `'</span></div>
<div>
<div class="m_7940448321645396498m_-7722231748731228176h5">
<div><br> On Jul 7, 2017, at 00:47, Jeremy Laidman <<a href="mailto:jlaidman@rebel-it.com.au" target="_blank">jlaidman@rebel-it.com.au</a>> wrote:<br><br></div>
<blockquote type="cite" style="padding:0 0.4em;border-left:#1010ff 2px solid;margin:0">
<div>
<div dir="ltr">Hi
<div> </div>
<div>I'm getting what appear to be false-positives for the port test that is monitoring the LISTEN socket for port 22, as opened by the sshd daemon. A few times a month, Xymon will show that the server is not listening on port 22, and 5 minutes later, the listening port is back again. The sshd process has never crashed or been reconfigured (eg with SIGHUP), and no other listening ports are showing the same behaviour.  The client messages for the server during these events are complete and uncorrupted.</div>
<div> </div>
<div>The simplest fix is to use delayred to suppress alerts for 5 minutes. However, I would like to work out what's causing this behaviour. I don't believe this a problem with Xymon at all, and instead the netstat output in the client message is exactly what the OS provided the Xymon client. My guess is that it's due to a the way sshd works - perhaps it periodically rebinds to the socket - but nothing in the sshd logs seems to correlate with these events. If anyone can suggest what might be causing this, or how to investigate further, I'd be grateful.</div>
<div> </div>
<div>This problem happens for about a quarter of the servers in a pool, and no others. All servers are identical in OS, software and general configuration, but the servers affected by this tend to be the ones taking the most traffic and under the most load (although there's plenty of spare CPU cycles even on the most heavily-used server). I have two Xymon servers, each monitoring independently of the other, and this problem is reported by both Xymon servers, although at completely different dates and times.</div>
<div> </div>
<div>Cheers</div>
<div>Jeremy</div>
<div> </div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</blockquote>
<div> </div>
</div><div>Have you considered adding the SSH network test, in conjunction?</div><font color="#888888">
<div> </div>
<div>-- <br>
<div class="m_7940448321645396498m_-7722231748731228176pre" style="margin:0;padding:0;font-family:monospace">Mike Burger<br> <a href="http://www.bubbanfriends.org" rel="noreferrer" target="_blank">http://www.bubbanfriends.org</a><br> <br> "It's always suicide-mission this, save-the-planet that. No one ever just stops by to say 'hi' anymore." --Colonel Jack O'Neill, SG1</div>
</div>
</font></div>
</blockquote></div><br></div></div></div></div></div>
</blockquote></div><br></div>