Monitor live streams

This page describes how to view metrics collected by Live Stream API as part of Cloud Monitoring. You can find the list of Live Stream API metrics at Google Cloud metrics.

View Cloud Monitoring metrics

To view the metrics for a monitored resource by using the Metrics Explorer, do the following:

  1. In the Google Cloud console, go to the  Metrics explorer page:

    Go to Metrics explorer

    If you use the search bar to find this page, then select the result whose subheading is Monitoring.

  2. In the Metric element, expand the Select a metric menu, enter Live Stream API Channel in the filter bar, and then use the submenus to select a specific resource type and metric:
    1. In the Active resources menu, select Live Stream API Channel.
    2. To select a metric, use the Active metric categories and Active metrics menus.
    3. Click Apply.
  3. Configure how the data is viewed. For example, you can plot the chart for a specific channel by entering channel_id = my-channel in the Filters field.

    For more information about configuring a chart, see Select metrics when using Metrics Explorer.

Convert the input stream bitrate unit

You can use the channel/received_bytes_count metric to monitor your input stream bitrate. By default, the unit of channel/received_bytes_count is bytes per second to be consistent with other Google Cloud metrics.

Follow the steps below to change the unit to a different bitrate unit such as mbps:

  1. In the Metrics Explorer Configuration tab, set the Resource Type field to Live Stream API Channel and the Metric field to Received bytes count.

  2. Select the MQL tab.

  3. Attach a scale function to the end of the current query:

    fetch livestream.googleapis.com/Channel
    | metric 'livestream.googleapis.com/channel/received_bytes_count'
    | align rate(1m)
    | every 1m
    | scale("Mbit/s")
    
  4. Click RUN QUERY to replot the chart with the mbps unit.

For more information about MQL, see Using the Query Editor.