Hi,

2013/6/8 Andy Brown <[email protected]>:
> Thanks guys,
>
> I think I'm doing something wrong though as its not doing anything for
> me. My code snippet looks like this:
>
> def blank_alert()
>   system("echo -e '\nSilence or stream detect failures notification\n\n'
> | mail -s 'Silence - arctic' [email protected]
> end
>
> live1 = strip_blank(
>     on_blank(blank_alert,input.harbor(id="live", port=8005, password="pass",
>                  buffer=4.,max=40.,"stream.mp3")),
>     max_blank=20., threshold=-50.)
>
> to_live1 = to_live(security)
>
> full = fallback(track_sensitive=false,
>              transitions=[to_live1, to_file],
>              [live1, radio])
>
>
> Is that the right place to put it in? As i dropped the stream source for
> a few seconds and just saw the usual logs, no email alert.
>
> Any ideas?

on_blank is used to detect blanks in a source that is actually
streaming. If you want to be notified when the harbor source goes out
then you need to use its on_connect/on_disconnect parameters.
Alternatively, you can also look at on_end, which triggers a callback
when a source is about to end.

Romain

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to