ApsaraVideo Media Processing (MPS) allows you to monitor transcoding jobs by setting alert rules for MPS queues to which the transcoding jobs are added.

Set alert rules by using CloudMonitor

Background information

The monitoring feature of MPS allows you to query the metric data about system performance and resource usage. You can also create custom alert rules to monitor service stability and analyze resource usage to detect and diagnose issues at your earliest opportunity. For more information about alert rules and how to configure alert contacts and groups, see Overview and Create an alert contact or alert contact group.

Metrics

MetricUnitDescriptionStatistic dimensionTime granularity
RequestSuccessRate%The metric that describes the system availability of MPS. The metric value is calculated by using the following formula: Metric value = 1 - Server requests for which HTTP status code 5xx are returned/All requests. User5 minutes
SnapshotTasksCountThe number of snapshot job requests received by the MPS server. MPS queue1 minute
TranscodingDurationMinuteThe duration of the output videos processed by the MPS server. MPS queue1 minute
TranscodingTasksCountThe number of transcoding job requests received by the MPS server. MPS queue1 minute

Procedure

  1. Log on to the MPS console.
  2. In the left-side navigation pane, choose Global Settings > MPS Queue and Callback.
  3. Click Set Alarm Rule. The Alert Rules page appears.
    If you set alert rules for an MPS queue for the first time, a service-linked role is automatically created for CloudMonitor and a message appears. Click OK. If you have created a service-linked role for CloudMonitor, ignore the message. CloudMonitor Service-linked Role
  4. Click Create Alert Rule.
  5. Configure parameters in the Create Alert Rule panel. The following table describes the parameters.
    ParameterDescription
    ProductThe service for which you want to create an alert rule. Select ApsaraVideo Media Processing from the drop-down list.
    Resource RangeThe range of the resources to which the alert rule applies. Valid values:
    • All Resources: The alert rule applies to all resources of the specified cloud service.
    • Application Group: The alert rule applies to all resources in the specified application group of the specified cloud service.
    • Instances: The alert rule applies to the specified resources of the specified cloud service.
    Rule DescriptionThe content of the alert rule. The parameters in this section specify the conditions that trigger an alert. To specify the content of the alert rule, perform the following steps:
    1. Click Add Rule.
    2. In the Add Rule Description panel, specify the rule name, metric type, metrics, thresholds, alert levels, and notification methods.
    3. Click OK.
    Note For more information about how to specify complex alert conditions, see Alert rule expressions.
    Mute For

    The interval at which another alert notification is sent. Valid values: 5 Minutes, 15 Minutes, 30 Minutes, 60 Minutes, 3 Hours, 6 Hours, 12 Hours, and 24 Hours.

    If the threshold value is exceeded, CloudMonitor sends an alert notification. If the threshold value is exceeded again within the mute period, CloudMonitor does not resend an alert notification. If the alert is not cleared when the mute period elapses, CloudMonitor resends an alert notification.

    For example, if the Mute For parameter is set to 12 Hours and the alert is not cleared, Cloud Monitor resends an alert notification after 12 hours.

    Effective PeriodThe period during which the alert rule is effective. The system monitors the metrics and generates alerts only during the effective period.
    Alert Contact GroupThe alert contact group to which alert notifications are sent.

    The alert notifications of the application group are sent to the alert contacts that belong to the selected alert contact group. A contact group can contain one or more contacts. For more information about how to create an alert contact and an alert contact group, see Create an alert contact or alert contact group.

    Alert CallbackThe callback URL that can be accessed over the Internet. CloudMonitor sends POST requests to push alert notifications to the specified callback URL. Only HTTP is supported. For more information about how to configure alert callback, see Use the alert callback feature to send notifications about threshold-triggered alerts.
    Note You can click Advanced Settings to configure this parameter.
    To test the connectivity of an alert callback URL, perform the following steps:
    1. Click Test next to the callback URL.
      In the WebHook test panel, you can check and troubleshoot the connectivity of the alert callback URL based on the returned status code and test result details.
      Note To obtain the details of the test result, configure the Template Type and Language parameters and click Test.
    2. Click Close.
    Auto Scaling(The corresponding scaling rule will be triggered when the alert occurs.)If you turn on Auto Scaling and an alert is triggered, the specified scaling rule is enabled. In this case, you must configure the Region, ESS Group, and ESS Rule parameters.
    Note You can click Advanced Settings to configure this parameter.
    Log Service(If you select Log Service, the alert information will be written to Log Service.)If you turn on Log Service and an alert is triggered, the alert information is written to the specified Logstore in Log Service. In this case, you must configure the Region, ProjectName, and Logstore parameters.

    For more information about how to create a project and a Logstore, see Getting Started.

    Note You can click Advanced Settings to configure this parameter.
    Message Service - TopicIf you turn on Message Service - Topic and an alert is triggered, the alert information is written to the specified topic in Message Service (MNS). In this case, you must configure the Region and topicName parameters.

    For more information about how to create a topic, see Create a topic.

    Note You can click Advanced Settings to configure this parameter.
    Method to handle alerts when no monitoring data is foundThe method that you want to use to handle alerts when no monitoring data is found. Default value: Do not do anything. Valid values:
    • Do not do anything
    • Send alert notifications
    • Treated as normal
    Note You can click Advanced Settings to specify this parameter.
    TagSpecify tags for the alert rule. A tag consists of a name and a value.
  6. Click Confirm.

Manage an alert rule

  1. Log on to the CloudMonitor console.
  2. In the left-side navigation pane, choose Alerts > Alert Rules. On the page that appears, you can view, modify, enable, disable, or delete an alert rule as needed.