Stopping a Channel on input loss

0

I'm looking for a way to turn off a medialive channel when the input has been turned off, as I don't need to record the blackscreen, preferably without too much complexity. It seems like it should be quite a simple option

csouth
質問済み 3年前366ビュー
1回答
0

csouth

This is doable, but you would have to be careful not to stop the channel for any small hiccup on the input source to MediaLive.

One solution would be to use a lambda to monitor the logging from the MediaLive channel, and if it sees a log entry indicating a source failure and that log entry does not get cleared in a user-defined period (e.g. 30 sec), then the lambda can stop the channel for you.

  1. Enable logging in the channel. https://docs.aws.amazon.com/medialive/latest/ug/enabling-disabling-logs.html
  2. Look at the log messages being generated for your input type, and select from the list one that is generated when your source stops being received by the MediaLive channel.
  3. In the lambda create a trigger of type CloudWatch Logs and select the ElementalMediaLive log, set the filter name and set the pattern to the MediaLive channel ID and the text to the log message you determined to use for this effort. As an example the filter pattern could be "123454 Video not detected", with 123454 being the MediaLive Channel ID and the "Video not detected" being the alert that the Lambda should trigger on.
  4. Now the lambda will be able to receive the log entries that matches the pattern you defined in the previous step. The lambda should wait for a period of time, that you can define, to receive a Clear message for this asserted message, and if it does not receive the clear message within that time frame then it would initiate the StopChannel command for the specific MediaLive channel.
回答済み 3年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ