[smokeping-users] Running a script on Smokeping alert

Russell Dwarshuis rjd at merit.edu
Thu Dec 17 23:04:25 CET 2009


For what it's worth, here's what I used for awhile in a homebrew script:

+anyLoss
type = loss
# in percent
pattern = >1%
to = |/usr/local/smokeping/contrib/mtb_email.pl
comment = any loss

And then in my perl script:
my ($name_of_alert,$target,$loss_pattern,$rtt_pattern,$hostname) = @ARGV;

------------------------------------
So you could do something like:
to = |/your/path/to/syslogit.pl

And have syslogit.pl be as simple as:
#!/bin/perl
my ($name_of_alert,$target,$loss_pattern,$rtt_pattern,$hostname) = @ARGV;
`/bin/logger $hostname $target $name_of_alert`;


                                           -Russell Dwarshuis

On Thu, 17 Dec 2009, Shane Ronan wrote:

> Does any one have an example of this, the documentation is VERY 
> confusing. I am attempting to use this to send alerts to syslog.
>
> Thanks,
> Shane
>
> On Dec 17, 2009, at 7:40 AM, Russell Dwarshuis wrote:
>
>> It's documented, search for 'pipe' in the manual:
>> http://oss.oetiker.ch/smokeping/doc/smokeping_config.en.html
>>
>>
>>                                           -Russell Dwarshuis
>>
>> On Thu, 17 Dec 2009, Nathan Long wrote:
>>
>>> Is there any documentation for having Smokeping run an external script when
>>> an alert is triggered?  Mailing list searches make me thing people are doing
>>> it, but I'm having trouble figuring out how.
>>>
>>
>> _______________________________________________
>> smokeping-users mailing list
>> smokeping-users at lists.oetiker.ch
>> https://lists.oetiker.ch/cgi-bin/listinfo/smokeping-users
>
>



More information about the smokeping-users mailing list