# Auto restart dead streams and send a notification

**URL:** https://community.wowza.com/t/auto-restart-dead-streams-and-send-a-notification/54093
**Category:** Wowza Streaming Engine
**Created:** [October 21, 2019, 2:22pm UTC](https://community.wowza.com/t/auto-restart-dead-streams-and-send-a-notification/54093 "2019-10-21T14:22:25Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![Elie\_Obeid](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/elie_obeid/32/463_2.png) [@Elie\_Obeid](https://community.wowza.com/u/Elie_Obeid)
#### Post date: [October 21, 2019, 2:22pm UTC](https://community.wowza.com/t/auto-restart-dead-streams-and-send-a-notification/54093/1 "2019-10-21T14:22:25Z")

</div>

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](https://www.wowza.com/docs/how-to-reconnect-to-offline-streams-native-rtp-mpeg-ts-rtsp-rtp-shoutcast-icecast) is how you restart the channels? If so, then I only need to figure out how to get notified when the stream goes down.

---

<div class="post-metadata">

### Author: ![Rose\_Power-Wowza\_Com](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/rose_power-wowza_com/32/431_2.png) [@Rose\_Power-Wowza\_Com](https://community.wowza.com/u/Rose_Power-Wowza_Com)
#### Post date: [October 21, 2019, 5:26pm UTC](https://community.wowza.com/t/auto-restart-dead-streams-and-send-a-notification/54093/2 "2019-10-21T17:26:48Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Rose\_Power-Wowza\_Com](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/rose_power-wowza_com/32/431_2.png) [@Rose\_Power-Wowza\_Com](https://community.wowza.com/u/Rose_Power-Wowza_Com)
#### Post date: [October 21, 2019, 5:40pm UTC](https://community.wowza.com/t/auto-restart-dead-streams-and-send-a-notification/54093/3 "2019-10-21T17:40:59Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Elie\_Obeid](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/elie_obeid/32/463_2.png) [@Elie\_Obeid](https://community.wowza.com/u/Elie_Obeid)
#### Post date: [October 21, 2019, 5:44pm UTC](https://community.wowza.com/t/auto-restart-dead-streams-and-send-a-notification/54093/4 "2019-10-21T17:44:03Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Rose\_Power-Wowza\_Com](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/rose_power-wowza_com/32/431_2.png) [@Rose\_Power-Wowza\_Com](https://community.wowza.com/u/Rose_Power-Wowza_Com)
#### Post date: [October 21, 2019, 5:44pm UTC](https://community.wowza.com/t/auto-restart-dead-streams-and-send-a-notification/54093/5 "2019-10-21T17:44:59Z")

</div>

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.

[https://www.wowza.com/professional-services](https://www.wowza.com/professional-services)

---

<div class="post-metadata">

### Author: ![Elie\_Obeid](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/elie_obeid/32/463_2.png) [@Elie\_Obeid](https://community.wowza.com/u/Elie_Obeid)
#### Post date: [October 21, 2019, 5:47pm UTC](https://community.wowza.com/t/auto-restart-dead-streams-and-send-a-notification/54093/6 "2019-10-21T17:47:33Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Rose\_Power-Wowza\_Com](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/rose_power-wowza_com/32/431_2.png) [@Rose\_Power-Wowza\_Com](https://community.wowza.com/u/Rose_Power-Wowza_Com)
#### Post date: [October 21, 2019, 6:22pm UTC](https://community.wowza.com/t/auto-restart-dead-streams-and-send-a-notification/54093/7 "2019-10-21T18:22:18Z")

</div>

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…

---

<div class="post-metadata">

### Author: ![Rose\_Power-Wowza\_Com](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/rose_power-wowza_com/32/431_2.png) [@Rose\_Power-Wowza\_Com](https://community.wowza.com/u/Rose_Power-Wowza_Com)
#### Post date: [October 21, 2019, 9:05pm UTC](https://community.wowza.com/t/auto-restart-dead-streams-and-send-a-notification/54093/8 "2019-10-21T21:05:22Z")

</div>

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

```auto
2019-10-16 12:24:11 MDT publish stream INFO 200 axis.stream - _defaultVHost_ live _definst_ 0.038 - 80 null 127.0.0.1

```

---

<div class="post-metadata">

### Author: ![Rose\_Power-Wowza\_Com](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/rose_power-wowza_com/32/431_2.png) [@Rose\_Power-Wowza\_Com](https://community.wowza.com/u/Rose_Power-Wowza_Com)
#### Post date: [October 21, 2019, 9:07pm UTC](https://community.wowza.com/t/auto-restart-dead-streams-and-send-a-notification/54093/9 "2019-10-21T21:07:21Z")

</div>

In this example you see the unpublish event:

```auto
2019-10-16 12:24:55 MDT unpublish stream INFO 200 axis.stream-_defaultVHost_live_definst_44.37-80 null 127.0.0.1

```

---

<div class="post-metadata">

### Author: ![Elie\_Obeid](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/elie_obeid/32/463_2.png) [@Elie\_Obeid](https://community.wowza.com/u/Elie_Obeid)
#### Post date: [October 21, 2019, 9:09pm UTC](https://community.wowza.com/t/auto-restart-dead-streams-and-send-a-notification/54093/10 "2019-10-21T21:09:18Z")

</div>

Thank you so much! I’m really grateful!

---

<div class="post-metadata">

### Author: ![Rose\_Power-Wowza\_Com](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/rose_power-wowza_com/32/431_2.png) [@Rose\_Power-Wowza\_Com](https://community.wowza.com/u/Rose_Power-Wowza_Com)
#### Post date: [October 21, 2019, 9:17pm UTC](https://community.wowza.com/t/auto-restart-dead-streams-and-send-a-notification/54093/11 "2019-10-21T21:17:32Z")

</div>

Hope it helped! 🙂

---

<div class="post-metadata">

### Author: ![Elie\_Obeid](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/elie_obeid/32/463_2.png) [@Elie\_Obeid](https://community.wowza.com/u/Elie_Obeid)
#### Post date: [October 26, 2019, 1:21pm UTC](https://community.wowza.com/t/auto-restart-dead-streams-and-send-a-notification/54093/12 "2019-10-26T13:21:36Z")

</div>

Cto says that he’s not sure if [this](https://www.wowza.com/docs/how-to-reconnect-to-offline-streams-native-rtp-mpeg-ts-rtsp-rtp-shoutcast-icecast) 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.
