Get started with Monitoring

Publish a custom metric, put an alarm on it, check a URL from outside, read the result, and delete what you made, in about ten minutes.

Last updated 18 November 2026View as Markdown

Replace https://example.com/ with a URL of your own, and alarm-id and check-id with the ids the create steps return. Nothing here touches a machine.

Prerequisites

  • Permission for monitoring:PutMetricData, monitoring:PutMetricAlarm, monitoring:CreateCheck, monitoring:GetCheckResults, monitoring:DeleteAlarms and monitoring:DeleteChecks.
  • In the console, also monitoring:DescribeAlarms to open Alarms and monitoring:DescribeChecks to open Uptime and the check's page; without them the list pages show an access-denied notice and the check's page is not found.
  • For the CLI steps, the dcloud CLI, signed in. For the API steps, an access key.

Step 1: Publish a datapoint

A custom series exists from its first datapoint on. The points you keep are metered storage.

Not available in Console. The console charts custom metrics but does not publish them.

The answer is { "success": true, "data": { "accepted": 1, "rejected": [] } }. Under Monitoring, Custom metrics, the namespace Shop now lists the series orders_placed.

Step 2: Alarm on the series

The alarm fires when fewer than one order is placed in a five-minute period.

Not available in Console. The console creates alarms on machines and other resources only, not on custom series.

The answer is 201 with the alarm in INSUFFICIENT_DATA. It is evaluated every minute; read its state and the reason with dcloud monitoring alarms get alarm-id. While the evaluated period has no datapoint it stays INSUFFICIENT_DATA: a missing datapoint never counts as fewer than one (see How alarms work).

Step 3: Check a URL

  1. Open Monitoring, then Uptime, and choose Create check.
  2. For Name, enter Example.
  3. For URL, enter https://example.com/.
  4. Choose Create check.

The check appears in the list in the pending state.

The check runs within a minute, then every five minutes. If the answer is 409 with "… is already checked … times a minute by …", other checks already request that host as often as the platform allows; use a URL of your own.

Step 4: Read the result

  1. In Uptime, choose the check's row.
  2. The page shows the state and why, and under Response time the share of runs that succeeded and the response times. Latest results lists each run from each location.

After its first run the check is up, regional or still pending; it becomes down only after two failed runs in a row (see How uptime checks work).

Clean up

Delete the alarm and the check. The custom series cannot be deleted: with no new datapoints, its minute points are removed after 15 days and the series after 15 months.

  1. In Alarms, open the action menu of the alarm No orders, choose Delete alarm, then Delete.
  2. In Uptime, open the action menu of the check, choose Delete check, then Delete.

Next steps

Did this page help you?