AWS Elemental MediaLive
AWS Elemental MediaLive is a real-time video encoding service that converts live video into outputs for broadcast and streaming, often for distribution through AWS Elemental MediaPackage or a CDN.
MediaLive exports logs and metrics to CloudWatch. These steps send both to Hydrolix through two Amazon Data Firehose streams, one for encoder logs and one for metrics. Adding MediaLive as a data source in the Hydrolix for AWS web console provisions both streams, and the default MediaLive dashboard shows data from both.
Prerequisites⚓︎
- Two Amazon Data Firehose streams, one for encoder logs and one for metrics, such as
hdx-logs-medialive-encodingandhdx-logs-medialive-metrics:- With Hydrolix for AWS: adding MediaLive as a data source provisions both.
- On a self-managed cluster: create the streams and connect them to Hydrolix. See Amazon Data Firehose.
Send MediaLive encoder logs to Hydrolix⚓︎
MediaLive writes encoder logs to a CloudWatch log group, and a subscription filter forwards them to the logs Firehose stream.
- Enable encoder logs. Follow Enabling channel encoder logs.
- Create an IAM role that lets CloudWatch Logs write to the Firehose stream. For the CLI, follow the steps that create the CloudWatch Logs role in Subscription filters with Amazon Data Firehose. For the console, see Creating a role for an AWS service (console).
- In the CloudWatch console, open Log groups under Logs.
- Select the log group named
ElementalMediaLive, which CloudWatch creates. - From the Actions menu, choose Subscription filters > Create Amazon Data Firehose subscription filter.
- Choose the Data Firehose stream for logs from Prerequisites. With Hydrolix for AWS, the stream name begins with
hdx-logs-medialive-encoding-.... - In Grant permissions, select the IAM role created earlier.
- In Log format, choose JSON.
- Select Start streaming. Encoder logs then stream to Hydrolix.
Limit log retention to reduce costs
To reduce CloudWatch storage costs, lower the retention period for these log groups if nothing reads the logs in CloudWatch. To change it, see Change log data retention in CloudWatch Logs.
Send MediaLive metrics to Hydrolix⚓︎
MediaLive publishes metrics to CloudWatch. To send them to Hydrolix:
- In the CloudWatch console, open Streams under Metrics.
- Select Create metric stream.
- On the setup page, choose Custom setup with Firehose.
- In Change output format (optional), select JSON.
- Choose the Data Firehose stream for metrics from Prerequisites. With Hydrolix for AWS, the stream name begins with
hdx-logs-medialive-metrics-.... - (Optional) Leave the default name or enter a name in Custom metric stream name.
- Select Create metric stream. Metrics then flow from CloudWatch to Hydrolix.