How to Explore and Query Metrics

Last verified 23 Nov 2026

DigitalOcean Insights provides metrics, logs, traces, dashboards, and alerts to help you monitor, analyze, and troubleshoot supported DigitalOcean resources.

The Metrics tab lets you explore available metrics, compare metric data, and create charts for your dashboards. For an overview of metrics and how they relate to logs and traces, see Understanding Insights Telemetry.

Note

You can enable available Insights telemetry when creating a supported DigitalOcean resource. The available options depend on the resource type.

For Droplets, under the Monitoring section, select Improved Metrics and monitoring (Free) to install the DigitalOcean metrics agent (do-agent). For GPU Droplets created with AI/ML Ready images, enable GPU Observability during resource creation. The agent collects supported system and GPU metrics, but logs and traces are not currently supported.

For supported managed resources, you can enable log and trace collection during resource creation and disable it later if needed. Insights is enabled by default for Managed Agents.

To view metrics, go to the Metrics tab in the DigitalOcean Control Panel.

Explore Metrics Using the Control Panel

The Explore tab displays available metrics for the selected region or resource. On the left, the Metrics panel lists available metrics, while the main area displays charts for the metrics you select. You can compare metric data, customize queries, and change how metrics are aggregated.

To view the Explore tab, in the top-left, click Explore.

Metrics Explore tab showing available metrics, filtering options, and metric charts.

Select a Region or Resource

In the top-left corner, click the Region dropdown menu to choose how to scope your query.

You can select one of the following options:

  • Region: Select a region to view its telemetry data. Use the Search regions field to find a specific region.
  • Resource: Select a specific resource to view its telemetry data. Use the Search resources field to find a resource.
  • Multi-Region Resource: Select a resource type to view telemetry data across multiple regions.

The selected region, resource, or multi-region resource type determines which telemetry data appears in the results.

Some resources can store telemetry outside their own region, including Serverless Inference, Batch Inference, Action Gateway, and load balancers. When you select one of these resources, Insights looks up the regions where the resource’s metrics are stored and queries each of them.

Note

When you select a region, metric queries are limited to that region. You cannot query or aggregate metric data across multiple regions in a single query.

Set the Time Range

In the top-right corner, click the Time range dropdown menu to select a relative range from Last 5 minutes to Last 14 days, or specify an absolute range using the From and To fields.

Use the Timezone dropdown menu to select the timezone for displaying metric timestamps. The default is your browser’s local timezone.

Set the Refresh Interval

In the top-right corner, click the Refresh interval dropdown menu to select Off, 1m, 5m, 15m, 30m, 1h, 2h, or 1d.

To refresh the metric data manually, click the refresh icon.

Select Metrics

You can select multiple metrics to compare their data. Each selected metric appears as a separate chart. By default, no metrics are selected, but on the left, the Metrics panel lists available metrics for the selected region or resource.

On the left, in the Metrics panel, use the Search metrics field to find a metric, select a metric group using its checkbox, or expand a section, such as do.droplets, to select individual metrics.

To remove a metric from your selection, clear its checkbox.

Filter Metrics

To limit the metric data displayed, click + Filter, and then in the Label field, select or enter the label to filter by. For example, use resource.urn to filter metrics for a specific resource.

Then, click the Operator dropdown menu to select =, in, >, >=, <, or <=.

Then, in the Value field, enter the value to compare against.

After configuring your filter, click Apply.

Click + Filter to add another filter, if needed.

To remove a filter, click the trash icon next to it. To delete all filters, click Clear all.

Customize a Metric Chart

You can customize a selected metric’s query or change how its data is aggregated.

To customize a metric’s query, hover over its chart, and then in the top-right corner, click the pencil icon. This opens the Query tab with the metric’s query already configured. You can modify the query, visualization, and other chart settings. For more information, see Add a Metric to a Dashboard Using the Control Panel.

To change how a metric is aggregated, hover over its chart, and then in the top-right corner, click the gear icon. This opens the Choose how this metric is aggregated window, where you can select from the available aggregation options:

  • Average: Displays the average metric value.
  • Sum: Displays the sum of metric values.
  • Min / Max: Displays the minimum and maximum metric values.
  • Percentiles: Displays selected percentiles, such as p50, p75, p95, or p99.

You can select multiple aggregation options to compare their results. The available options depend on the metric type.

After selecting the aggregation options, click Apply to update the chart. To restore the metric’s default aggregation settings, click Reset to default.

Explore Metrics Using Automation

You can explore metrics using the DigitalOcean CLI or API to retrieve metric label names, list label values, and find metric series that match specific criteria.

Explore Metrics via the CLI

To retrieve available metric label names in a region, use the doctl insights metrics labels command with the --region flag.

How to List Metric Label Names Using the DigitalOcean CLI
  1. Install doctl, the official DigitalOcean CLI.

  2. Create a personal access token and save it for use with doctl.

  3. Use the token to grant doctl access to your DigitalOcean account.

    doctl auth init
  4. Finally, run doctl insights metrics labels. Basic usage looks like this, but you can read the usage docs for more details:

    doctl insights metrics labels [flags]

    The following example lists the label names on up series:

    doctl insights metrics labels --region nyc3 --match 'up'

To retrieve available values for a specific label, use the doctl insights metrics label-values command with the label name and the --region flag.

How to List Values for a Metric Label Using the DigitalOcean CLI
  1. Install doctl, the official DigitalOcean CLI.

  2. Create a personal access token and save it for use with doctl.

  3. Use the token to grant doctl access to your DigitalOcean account.

    doctl auth init
  4. Finally, run doctl insights metrics label-values. Basic usage looks like this, but you can read the usage docs for more details:

    doctl insights metrics label-values <label-name> [flags]

    The following example lists the values of the job label:

    doctl insights metrics label-values job --region nyc3

To retrieve metric series that match specific label selectors, use the doctl insights metrics series command with the --region and --match flags.

How to Find Metric Series by Label Selectors Using the DigitalOcean CLI
  1. Install doctl, the official DigitalOcean CLI.

  2. Create a personal access token and save it for use with doctl.

  3. Use the token to grant doctl access to your DigitalOcean account.

    doctl auth init
  4. Finally, run doctl insights metrics series. Basic usage looks like this, but you can read the usage docs for more details:

    doctl insights metrics series [flags]

    The following example lists series for two jobs:

    doctl insights metrics series --region nyc3 --match 'up{job="api"}' --match 'up{job="worker"}'

Explore Metrics via the API

To retrieve available metric label names in a region, send a request to the List Metric Label Names endpoint.

How to List Metric Label Names Using the DigitalOcean API

Create a personal access token and save it for use with the API.

cURL

Send a GET request to https://api.digitalocean.com/v2/insights/query/{region}/prom/api/v1/labels.

Using cURL:

curl -X GET \
  -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
  "https://api.digitalocean.com/v2/insights/query/nyc3/prom/api/v1/labels"

To retrieve available values for a specific label, send a request to the List Metric Label Values endpoint with the label name.

How to List Values for a Metric Label Using the DigitalOcean API

Create a personal access token and save it for use with the API.

cURL

Send a GET request to https://api.digitalocean.com/v2/insights/query/{region}/prom/api/v1/label/{name}/values.

Using cURL:

curl -X GET \
  -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
  "https://api.digitalocean.com/v2/insights/query/nyc3/prom/api/v1/label/__name__/values"

To retrieve metric series that match specific label selectors, send a request to the Find Metric Series endpoint.

How to Find Metric Series by Label Selectors Using the DigitalOcean API

Create a personal access token and save it for use with the API.

cURL

Send a GET request to https://api.digitalocean.com/v2/insights/query/{region}/prom/api/v1/series.

Using cURL:

curl -X GET \
  -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
  --get "https://api.digitalocean.com/v2/insights/query/nyc3/prom/api/v1/series" \
  --data-urlencode 'match[]={__name__="do.droplets.cpu_time"}'

Add a Metric to a Dashboard Using the Control Panel

The Query tab lets you build and customize charts that you can save to dashboards. Alternatively, in the Explore tab, hover over the chart you want to make a query for, and then in the top-right corner, click the pencil icon.

To view the Query tab, in the top-left, click Query.

Metrics Query tab showing the chart preview, Visual Builder, chart types, and Save to Dashboard button.

The Query tab uses the same chart and query configuration options available when adding a chart to a dashboard. Configure the chart type, query, visualization options, and other chart settings.

After configuring the chart, in the top-right corner, click Save to Dashboard to open the Save to Dashboard window.

In the Destination section, you can either select an Existing dashboard or create a New dashboard:

If you choose to use an existing dashboard, click the Dashboard dropdown menu, and then select the dashboard where you want to add the chart.

If groups exist in your dashboard, click the Group dropdown menu, and then select the group you want the chart added to.

In the Chart title field, enter a descriptive title for the chart.

Then, click Save to Dashboard.

If you choose to create a new dashboard, in the Dashboard name field, enter a name for the dashboard.

In the Panel Title field, enter a title for the chart.

Then, click Save to Dashboard. The new dashboard appears in the Dashboards tab.

Query Metrics Using Automation

You can query metrics using the DigitalOcean CLI or API to retrieve metric data at a specific point in time or over a time range. Metric queries are region-specific, so each request retrieves data from one region.

Query Metrics via the CLI

To retrieve metric data at a specific point in time, use the doctl insights metrics query command with the --region flag and a PromQL query in the --query flag.

How to Execute an Instant PromQL Query Using the DigitalOcean CLI
  1. Install doctl, the official DigitalOcean CLI.

  2. Create a personal access token and save it for use with doctl.

  3. Use the token to grant doctl access to your DigitalOcean account.

    doctl auth init
  4. Finally, run doctl insights metrics query. Basic usage looks like this, but you can read the usage docs for more details:

    doctl insights metrics query [flags]

    The following example returns the current value of the up metric in nyc3:

    doctl insights metrics query --region nyc3 --query 'up'

To retrieve metric data over a time range, use the doctl insights metrics query-range command with the --region and --query flags, and set the time range and resolution with the --start, --end, and --step flags.

How to Execute a Range PromQL Query Using the DigitalOcean CLI
  1. Install doctl, the official DigitalOcean CLI.

  2. Create a personal access token and save it for use with doctl.

  3. Use the token to grant doctl access to your DigitalOcean account.

    doctl auth init
  4. Finally, run doctl insights metrics query-range. Basic usage looks like this, but you can read the usage docs for more details:

    doctl insights metrics query-range [flags]

    The following example returns the per-second request rate over one hour at one-minute resolution:

    doctl insights metrics query-range --region nyc3 --query 'rate(http_requests_total[5m])' --start 2026-09-01T00:00:00Z --end 2026-09-01T01:00:00Z --step 1m

Query Metrics via the API

To retrieve metric data at a specific point in time, send a PromQL query to the Execute an Instant PromQL Query endpoint.

How to Execute an Instant PromQL Query Using the DigitalOcean API

Create a personal access token and save it for use with the API.

cURL

Send a GET request to https://api.digitalocean.com/v2/insights/query/{region}/prom/api/v1/query.

Using cURL:

curl -X GET \
  -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
  --get "https://api.digitalocean.com/v2/insights/query/nyc3/prom/api/v1/query" \
  --data-urlencode "query=do.droplets.cpu_time"

To retrieve metric data over a time range, send a PromQL query to the Execute a Range PromQL Query endpoint.

How to Execute a Range PromQL Query Using the DigitalOcean API

Create a personal access token and save it for use with the API.

cURL

Send a GET request to https://api.digitalocean.com/v2/insights/query/{region}/prom/api/v1/query_range.

Using cURL:

curl -X GET \
  -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
  --get "https://api.digitalocean.com/v2/insights/query/nyc3/prom/api/v1/query_range" \
  --data-urlencode "query=do.droplets.cpu_time" \
  --data-urlencode "start=1620683817" \
  --data-urlencode "end=1620705417" \
  --data-urlencode "step=15s"

We can't find any results for your search.

Try using different keywords or simplifying your search terms.