monitor your services.md

Monitor with operational metrics

Enable operational metrics when you need to monitor live events, streaming endpoints, and completed on-demand encoding jobs.

The metrics you can scrape from your MK.IO can be used to monitor workflow services, including:

Metrics are enabled per subscription. Once enabled, you will have access to metrics for all services within your subscription.

Note: Metrics publishing is a chargeable service and is not enabled by default. Check MK.IO pricing for current rates.

Enable metrics on your MK.IO subscription

To enable metrics on your MK.IO subscription:

  1. Log in to MK.IO and select a subscription.
  2. From the left-hand side menu, navigate to Usage and Metrics.
  3. Enable the metrics using the switch at the top right of the page.

Once metrics are activated, MK.IO will provide you with a URL, a Username and a Password. This information can be used by your monitoring infrastructure to scrape the metrics from MK.IO.

Note: You can also enable metrics through the Management API.

Scrape metrics into Grafana Cloud

Once metrics are enabled in MK.IO, you can obtain a real-time stream of metrics by scraping the “federate” endpoint returned in the enable API call. Metrics are updated every 30s.

To scrape metrics into your Grafana Cloud account:

  1. Log in to Grafana Cloud. Create an account if you do not already have one.
  2. From the left-hand menu, go to Connections and click Add new connection.
  3. In the search bar, type Metrics Endpoint, then open the Metrics Endpoint integration.
  4. Click Add new scrape job.

Configure the scrape job

Get the details below from the MK.IO portal and enter them into Grafana.

  1. Name: Enter a name for your scrape job.
  2. Scrape Job URL: Use the URL provided by MK.IO (the federate endpoint), for example https://<URL provided by MK.IO>.
  3. Basic authentication: Enter the Username and Password provided by MK.IO.
  4. Scrape interval: Set the interval to 30s or 1 minute. Use 30s if you need tighter real-time visibility; use 1 minute to reduce cost and data volume.
  5. Test Connection to verify the endpoint is reachable.
  6. Click Save Scrape Job.

View metrics

  1. Import the MK.IO dashboard into your Grafana Cloud account, or
  2. Open Explore and search for metrics starting with mk\_.

For a full list of MK.IO services and supported metrics, see the Metrics and labels section below.

Metrics and labels

Each service in MK.IO provides different sets of metrics and labels.

The "Labels" column shows labels specific to each metric. Additionally, there are labels that are common to all customer metrics: region, project_name, project_id.

Subscription

Services exposing: Subscription, Subscription quotas.

metric Description Type Labels
mk_up Always present and equal to 1 when metrics are enabled Gauge
mkio_api_assetfilters_total Total number of Asset Filters in the subscription Gauge
mkio_api_assets_total Total number of Assets in the subscription Gauge
mkio_api_contentkeypolicies_total Total number of Content Key Policies in the subscription Gauge
mkio_api_devices_total Total number of Devices in the subscription Gauge
mkio_api_filters_total Total number of Filters in the subscription Gauge
mkio_api_jobs_total Total number of Jobs in the subscription Gauge
mkio_api_jobs_running_total Total number of Jobs currently running Gauge
mkio_api_liveeventoutputs_total Total number of Live Event Outputs in the subscription Gauge
mkio_api_liveevents_total Total number of Live Events in the subscription Gauge
mkio_api_liveevents_running_total Total number of Live Events currently running Gauge
mkio_api_liveevents_stopped_total Total number of Live Events currently stopped Gauge
mkio_api_remoteconnections_total Total number of Remote Connections in the subscription Gauge
mkio_api_storageaccounts_total Total number of Storage Accounts linked to the subscription Gauge
mkio_api_streamingendpoints_total Total number of Streaming Endpoints in the subscription Gauge
mkio_api_streamingendpoints_running_total Total number of Streaming Endpoints currently running Gauge
mkio_api_streamingendpoints_stopped_total Total number of Streaming Endpoints currently stopped Gauge
mkio_api_streamingendpoints_unit_total Total number of Streaming Endpoint Units allocated Gauge
mkio_api_streaminglocators_total Total number of Streaming Locators in the subscription Gauge
mkio_api_streamingpolicies_total Total number of Streaming Policies in the subscription Gauge
mkio_api_transforms_total Total number of Transforms in the subscription Gauge
mkio_api_tunnels_total Total number of Tunnels in the subscription Gauge

Streaming endpoint

Services exposing: StreamingEndpoint.

metric Description Type Labels
mk_jitp_up Equal to 1 if a streaming endpoint is started Gauge resource_name, endpoint_type, cdn_enabled
mk_jitp_bitrate Current bitrate (bits/s). Also usable to calculate total bytes egress Gauge sc_status, content_type, resource_name, (live only: streaming_locator_id, availability)
mk_jitp_request_rate Current request rate (reqs/s) Gauge sc_status, content_type, resource_name, (live only: streaming_locator_id, availability)
mk_jitp_latency_bucket_rate Histogram providing response times for requests Histogram rate sc_status, content_type, resource_name, le, (live only: streaming_locator_id, availability)
mk_cdn_bytes_total Bytes emitted from CDN Counter resource_name

Live events

Services exposing: LiveEventPassThru, LiveEventEncode.

metric Description Type Labels
mk_live_up Equal to 1 if a live event is running Gauge resource_name
mk_live_input_bitrate_bps Bitrate arriving via RTMP or SRT Gauge resource_name, type, stream, mode
mk_live_output_storage_bitrate_bps Bitrate written to storage; includes storage write response code Gauge resource_name, sc_status
mk_live_input_etr290_bitrate_bps Input MPEG-2 TS bitrate (informational) Gauge resource_id, resource_name
mk_live_input_etr290_ts_sync_loss_total Total TS sync loss events detected (ETR-290 Priority 1) Counter resource_id, resource_name
mk_live_input_etr290_sync_byte_error_total Total sync byte errors detected (ETR-290 Priority 1) Counter resource_id, resource_name
mk_live_input_etr290_pat_error_total Total PAT errors detected (ETR-290 Priority 1) Counter resource_id, resource_name
mk_live_input_etr290_cc_error_total Total continuity counter (CC) errors detected per PID (ETR-290 Priority 2) Counter resource_id, resource_name, stream_type, stream_pid
mk_live_input_etr290_pmt_error_total Total PMT errors detected (ETR-290 Priority 2) Counter resource_id, resource_name
mk_live_input_etr290_pid_error_total Total invalid/missing PID errors detected per PID (ETR-290 Priority 2) Counter resource_id, resource_name, stream_type, stream_pid
mk_live_input_etr290_transport_error_total Total MPEG-2 TS transport errors detected (ETR-290 Priority 2) Counter resource_id, resource_name
mk_live_input_max_pcr_jitter_ppm Maximum PCR jitter (ppm) observed on MPEG-2 TS input (informational) Gauge resource_id, resource_name

Jobs

Services exposing: Jobs (VideoProcessing, etc.).

metric Description Type Labels
mk_jobs_completed_total Number of completed jobs, includes error code if success == false; for VideoProcessing “type=encoding” Counter success, type, error