<div dir="ltr"><div><div>I second the monit suggestion. I have used it for exactly this purpose (watching/restarting slave threads) in the past.<br><br></div>regards,<br></div>Darren<br></div><div class="gmail_extra"><br><div class="gmail_quote">On 23 April 2018 at 05:47, Bill Houle <span dir="ltr"><<a href="mailto:bhoule@siliconexus.com" target="_blank">bhoule@siliconexus.com</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></div><div>As someone who recently had to implement a monitor of not-smokeping processes, might I suggest “monit”? It is a fairly mainstream package that is readily available in yum and apt-get repos. </div><div><br></div><div>Monit is a locally-installed (ie per slave) daemon process that can monitor files (by timestamp or checksum), processes (by PID), programs (by exit code), and system (by resource consumption). It has a flexible config language that can alert/start/stop/exec based on those monitor conditions. </div><div><br></div><div>I could see monit being used to watch each slave and alert and/or auto-restart the data collection. </div><div><br></div><div>—bill</div><div><div class="h5"><div><br></div><div><br></div><div><br>On Apr 22, 2018, at 11:29 AM, Gregory Sloop <<a href="mailto:gregs@sloop.net" target="_blank">gregs@sloop.net</a>> wrote:<br><br></div><blockquote type="cite"><div>
<span style="font-family:'Courier New';font-size:9pt">This is an awesome idea - and one I've wished for in the past - but never got around to working on.<br>
Checking the slave data files modification times seems plausible as a way to check updates - but you'd have to test to be sure. [IIRC that will work though.]<br>
<br>
Personally, I'd probably try to write it in bash - or something completely external to smokeping. [Bash because of few dependicies - though you'll probably want/need something like sendemail for email notifications...<br>
<br>
If slaves are behind NAT or something similar, you'll have to have a way to get to the slave for handling a restart, but that's really outside the scope of what you're doing. <br>
<br>
Honestly, simply getting notification that a slave is not pushing updates would be more than enough - even without the restart.<br>
<br>
Sounds fab to me. And I can't think of a better way, off hand.<br>
<br>
-Greg<br>
<br>
</span><table>
<tbody><tr>
<td width="3" bgcolor="#0000ff"><br>
</td>
<td><span style="font-family:'courier new';font-size:9pt">Hello,<br>
<br>
I have a Debian Jessie box with Smokeping 2.6 installed on it.<br>
<br>
It receives data from Slaves over the Internet (10 slaves or so).<br>
Each Slave roughly monitors xDSL or fiber links.<br>
<br>
Every monday, I can see that data from one or two slaves is missing.<br>
Then I remotely restart smokeping service on slave where data is missing.<br>
<br>
I would like to implement something like:<br>
<br>
- if no data at all from Slave for a given period of time, then restart Slave's smokeping service and send a Notice email<br>
<br>
- if no data at all from Slave for a longer period of time and Slave's restart already attempted, then send a Warning email<br>
<br>
As Slaves data is stored on a known directory ins Master's filesystem, I think I can detect when data from a slave has not been lately modified, reading directories of files modification times.<br>
<br>
Is there a better way to do so ? Alert's settings seem more appropriate when WAN links in my case, are slower.<br>
<br>
Best regards</span></td>
</tr>
</tbody></table>
<br><br>
<span style="font-family:'arial';color:#c0c0c0"><i>-- <br>
Gregory Sloop, Principal: Sloop Network & Computer Consulting<br>
Voice: 503.251.0452 x82<br>
EMail: </i></span><a style="font-family:'arial'" href="mailto:gregs@sloop.net" target="_blank">gregs@sloop.net</a><br>
<a style="font-family:'arial'" href="http://www.sloop.net" target="_blank">http://www.sloop.net</a><br>
<span style="font-family:'arial';color:#c0c0c0"><i>---</i></span></div></blockquote></div></div><blockquote type="cite"><div><span>______________________________<wbr>_________________</span><br><span>smokeping-users mailing list</span><br><span><a href="mailto:smokeping-users@lists.oetiker.ch" target="_blank">smokeping-users@lists.oetiker.<wbr>ch</a></span><br><span><a href="https://lists.oetiker.ch/cgi-bin/listinfo/smokeping-users" target="_blank">https://lists.oetiker.ch/cgi-<wbr>bin/listinfo/smokeping-users</a></span><br></div></blockquote></div><br>______________________________<wbr>_________________<br>
smokeping-users mailing list<br>
<a href="mailto:smokeping-users@lists.oetiker.ch">smokeping-users@lists.oetiker.<wbr>ch</a><br>
<a href="https://lists.oetiker.ch/cgi-bin/listinfo/smokeping-users" rel="noreferrer" target="_blank">https://lists.oetiker.ch/cgi-<wbr>bin/listinfo/smokeping-users</a><br>
<br></blockquote></div><br></div>