Monitor HTTPDNS with Cloud Monitor

更新时间:
复制 MD 格式

You can use Cloud Service Monitoring to monitor the resolution QPS of HTTPDNS.

Prerequisites

To view Cloud Monitor metrics, an Alibaba Cloud account must grant a RAM user the following permissions:

  1. Read-only (AliyunCloudMonitorReadOnlyAccess) or read/write (AliyunCloudMonitorFullAccess) permissions for Cloud Monitor. For more information, see Create a RAM user and grant permissions.

  2. Permission to call the GetCallerIdentity API of Security Token Service (STS).

View Cloud Monitor metrics

  1. Log on to the Cloud Monitor console.

  2. In the left-side navigation pane, choose Cloud Service Monitoring.

  3. In the Developer Tools category, choose EMAS.image

  4. Select the target instance ID.

    Note

    EMAS uses the UserId as the instance ID. Typically, only one instance is available.

    image

  5. In the monitoring charts, view the HTTPDNS resolution QPS metric.image

Cloud Monitor metric

Cloud Monitor metric

Description

Latency

Resolution QPS

The average number of DNS resolution requests per second for the entire system. Cloud Monitor calculates the resolution QPS for nodes in Chinese mainland and nodes in other regions per minute, and then sums the values to obtain the total resolution QPS.

This metric relies on log collection and data aggregation. The overall latency is about 2 minutes.

Set up alert rules

You can create alert rules for HTTPDNS in Cloud Monitor. When a metric triggers an alert rule, Cloud Monitor sends a notification by text message or email. You can create alert rules to monitor metrics such as resolution QPS for anomalies.

  1. Create an alert rule.

image

  1. Configure the alert rule. In this example, the alert condition is set to Compared with the previous cycle.

Note

For more information about alert rule parameters, see Create an alert rule.

image

image

Retrieve metrics with OpenAPI

You can also use Alibaba Cloud OpenAPI to query HTTPDNS resolution QPS metrics.

When you call the Cloud Monitor DescribeMetricList operation, the key parameters are as follows:

Parameter

Value

Required

Namespace

acs_emas

Yes

MetricName

httpdns_qps

Yes

Other parameters

Specify these parameters based on your requirements, such as the time range and period for the query.

No

For more information about this operation, see the DescribeMetricList API reference.