[smokeping-users] edgetrigger

Philip Wehunt pwehunt at gmail.com
Fri Feb 21 06:42:13 CET 2014


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
> 



More information about the smokeping-users mailing list