[smokeping-users] edgetrigger

Philip Wehunt pwehunt at gmail.com
Sat Feb 22 00:16:26 CET 2014


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.


On Fri, Feb 21, 2014 at 9:38 AM, Greg Sloop <gregs at sloop.net> <
gregs at sloop.net> wrote:

> I'd love to have your script when it's done. Provided you're willing to
> share..
>
> 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!
>
> Thanks
> On Feb 20, 2014 9:42 PM, "Philip Wehunt" <pwehunt at gmail.com> wrote:
>
>> 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.
>>
>> 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.
>>
>> 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.
>>
>> Agreed on the Nagios --however, we are a Science Logic/EM7 shop (I voted
>> nagios)
>>
>> Thanks for the reply.
>>
>>
>>
>> > On Feb 21, 2014, at 12:11 AM, Gregory Sloop <gregs at sloop.net> wrote:
>> >
>> >
>> > PW> I am currently building out our smokeping implementation and all
>> > PW> is going fantastic. However, due to specific needs, I am piping
>> > PW> alerts via edgetrigger to an external python script. I pulled my
>> > PW> hair out for nearly five hours debugging my script because the
>> > PW> 'cleared' argument was not firing my python script although the
>> > PW> built in alerts would.  I then discovered with a two liner bash
>> > PW> script that echo'd the args from smokeping that the expected '0'
>> > PW> on cleared is not being passed--only the 1 when raised.
>> >
>> > PW> I did my due diligence searching the list archives and if course
>> > PW> google. However, I was only able to find one mention of the issue
>> but no fix or remedy.
>> >
>> > PW> Hopefully someone can point me in the right direction.
>> >
>> > I can't offer any guidance - my solution to the very basic reporting
>> > in SP was to query the RRD's with a Nagios plug-in and use Nagios for
>> > reporting/alerting.
>> >
>> > Nagios can't generate alerts with the same elaborate criteria that SP
>> > does, but basic criteria work fine for me.
>> >
>> > In short, I think trying to handle reporting/alerting with SP is kind
>> > of nuts. [No offense to you, I tried too at one point - and I gave up.
>> > So, if anyone is nuts, I'm grouping myself with the "nuts" too.]
>> >
>> > I'd guess with 5 more hours, you could integrate this all in Nagios...
>> > :)
>> >
>> > [And I should mention that I can't get the detail I can get in SP with
>> > Nagios, so I don't use Nagios to actually gather stats on these targets,
>> > only SP. I use each tool where its strengths lie. SP for stats, and
>> > Nagios for alerts/reports.]
>> >
>> > But perhaps you're doing something else in your python script - but
>> > thought I'd offer my work-around for SP's minimal alerting.
>> >
>> > HTH
>> >
>> > -Greg
>> >
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/smokeping-users/attachments/20140221/51a5427d/attachment.htm 


More information about the smokeping-users mailing list