<div dir="ltr"><span style="font-family:arial,sans-serif;font-size:12.727272033691406px">I have spent part of the day tweaking the script on github referenced by Florian. I will fork and commit my version sometime this weekend. I will post link here when I have done so.</span><br>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Feb 21, 2014 at 9:38 AM, Greg Sloop <<a href="mailto:gregs@sloop.net">gregs@sloop.net</a>> <span dir="ltr"><<a href="mailto:gregs@sloop.net" target="_blank">gregs@sloop.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">I'd love to have your script when it's done. Provided you're willing to share.. </p>
<p dir="ltr">I've been meaning to use an MTR capture just as you are doing, but haven't done it yet.. Thus having yours as a template would be fab!</p>
<p dir="ltr">Thanks</p><div class="HOEnZb"><div class="h5">
<div class="gmail_quote">On Feb 20, 2014 9:42 PM, "Philip Wehunt" <<a href="mailto:pwehunt@gmail.com" target="_blank">pwehunt@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks for the reply. You helped me realize in my initial post I left out a key part of why I am scripting the alerts. Our current needs require an MTR to fire and catch a glimpse of each hop when our thresholds set in SP are hooked. So basically I have my python script parsing the args from SP in an argparse based function and passing that to a function that uses the parsed args to create my email, iterate mtr ten or so times with the --report flag and email it--as well as log it to a log file. We frequently need this granular data to escalate with our upstream BW providers.<br>
<br>
Works perfect when the 'raise' arg passes the '1' when SP triggers alert. But it only passes 5 arguments on the cleared run--so my script dies because it expects 6 args. Hence it doesn't fire my script to infirm the issue has cleared.<br>
<br>
I could hackishly work around this in my python but I wanted to identify if I am doing something wrong on the SP side or if it is a bug. Mainly in the spirit of KISS. I don't like to let hackish scripts linger.<br>
<br>
Agreed on the Nagios --however, we are a Science Logic/EM7 shop (I voted nagios)<br>
<br>
Thanks for the reply.<br>
<br>
<br>
<br>
> On Feb 21, 2014, at 12:11 AM, Gregory Sloop <<a href="mailto:gregs@sloop.net" target="_blank">gregs@sloop.net</a>> wrote:<br>
><br>
><br>
> PW> I am currently building out our smokeping implementation and all<br>
> PW> is going fantastic. However, due to specific needs, I am piping<br>
> PW> alerts via edgetrigger to an external python script. I pulled my<br>
> PW> hair out for nearly five hours debugging my script because the<br>
> PW> 'cleared' argument was not firing my python script although the<br>
> PW> built in alerts would. I then discovered with a two liner bash<br>
> PW> script that echo'd the args from smokeping that the expected '0'<br>
> PW> on cleared is not being passed--only the 1 when raised.<br>
><br>
> PW> I did my due diligence searching the list archives and if course<br>
> PW> google. However, I was only able to find one mention of the issue but no fix or remedy.<br>
><br>
> PW> Hopefully someone can point me in the right direction.<br>
><br>
> I can't offer any guidance - my solution to the very basic reporting<br>
> in SP was to query the RRD's with a Nagios plug-in and use Nagios for<br>
> reporting/alerting.<br>
><br>
> Nagios can't generate alerts with the same elaborate criteria that SP<br>
> does, but basic criteria work fine for me.<br>
><br>
> In short, I think trying to handle reporting/alerting with SP is kind<br>
> of nuts. [No offense to you, I tried too at one point - and I gave up.<br>
> So, if anyone is nuts, I'm grouping myself with the "nuts" too.]<br>
><br>
> I'd guess with 5 more hours, you could integrate this all in Nagios...<br>
> :)<br>
><br>
> [And I should mention that I can't get the detail I can get in SP with<br>
> Nagios, so I don't use Nagios to actually gather stats on these targets,<br>
> only SP. I use each tool where its strengths lie. SP for stats, and<br>
> Nagios for alerts/reports.]<br>
><br>
> But perhaps you're doing something else in your python script - but<br>
> thought I'd offer my work-around for SP's minimal alerting.<br>
><br>
> HTH<br>
><br>
> -Greg<br>
><br>
</blockquote></div>
</div></div></blockquote></div><br></div>