Wowza Community

Auto restart dead streams and send a notification

We have a Wowza server that’s running many live stream channels

  1. How to auto restart channels that stop?
  2. How to notify the admins that a channel has stopped?

A developer in my company has written a program that does both functionalities, we didn’t run it yet, shouldn’t there be a built-in functionality that does that?

Is this is how you restart the channels? If so, then I only need to figure out how to get notified when the stream goes down.

That is the correct article @Elie Obeid and as far as a notification that a stream is disconnected, there is no direct alert, but rather it is apparent in the logs.

I am gathering info on how you may be able to quickly identify this as the case in the logs and will post again very soon with additional info.

When a customer pushes into WSE @Elie Obeid, we really have no way to trigger connection/disconnection alerts.

When an incoming stream gets disconnected from Wowza server (due to source becoming unavailable or network connection issues) in Wowza Streaming Engine logs you would see an un-publish event. It should be possible to develop a custom Wowza module that would send an HTTP request to a third party API whenever the un-publish event is detected.

If you do parse the Wowza logs in real time, then the un-publish event would be the one signaling the fact that the source stream was disconnected from your Wowza server.

A log parser would be looking for publish/unpublish events for all streams and triggering HTTP API requests to an “alerting” system that you would need to have in place.

Any specific log? does the log holds the channel name?

If you need assistance with this alert system, please feel to reach out to out Pro Services team who may be able help you build that.

No need, I can easily write a python parser, just checking if there’s a specific log to parse. Why pay someone when the previous developer wrote a whole system to do that, I’m just checking if there’s an easier way before I learn his code.

Sure, that makes sense. I’ll check again with engineering and see if you’ll be looking for a certain app or stream id that connects to the “unpublish events” in the logs. Be back soon…

Per engineers: You would need to parse the event “line” and it would reveal the stream name. In this example is the name of the stream.

2019-10-16    12:24:11    MDT    publish    stream    INFO    200    -    _defaultVHost_    live    _definst_    0.038    -    80    null

In this example you see the unpublish event:

2019-10-16 12:24:55 MDT unpublish stream INFO 200 null

Thank you so much! I’m really grateful!

Hope it helped! :slight_smile:

Cto says that he’s not sure if this would work because it’s on the tsc level not the server level. What does it mean tsc level? Any idea? I’ll ask him but just checking with you to see if you understand something I don’t so we can solve it.