How to Customize Dashboard Charts

Last verified 23 Nov 2026

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

Customize dashboard charts to visualize metrics and logs, configure queries and links, and adjust chart placement using the DigitalOcean Control Panel or the dashboard’s JSON schema.

Available metrics depend on the selected resource type. Metrics are currently available for Droplets, Kubernetes, Managed Databases, Load Balancers, App Platform, Functions, AI/ML products, and networking services.

To organize charts into groups, see How to Customize Dashboard Groups. For guidance on chart configuration and dashboard organization, see Dashboard Best Practices.

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 customize a dashboard, go to the Dashboards tab in the Control Panel, and then find and select the dashboard you want to customize. If you haven’t created one, create a dashboard.

Dashboards tab showing the dashboard list, search field, and Create dashboard button.

Add a Chart Using the Control Panel

To add a chart to your dashboard, in the top-right corner, click + Add chart to open the Add chart window, or add a chart to a group. As you configure the chart, on the top-left panel, the chart preview updates immediately to reflect your configurations.

Note

Each dashboard supports up to 100 charts. For more information, see Insights Limits.

Set 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.

The chart editor’s time range is separate from the dashboard’s time range. When you view the dashboard, the dashboard’s time range applies to all of its charts.

Choose a Name

To choose a name, on the right, in the Name field, enter a name that identifies the metric or resource the chart displays, such as “Production CPU Utilization”.

Add a Description

To add a description, in the Description field, enter additional context about the chart, such as what it measures, which resources it includes, or how to interpret the data. For example, “Shows CPU utilization across production Droplets over the selected time range.”

Optionally, enable Hide header to hide the chart’s name and description. This option is disabled by default.

Select a Chart Type

In the Chart type section, select how to visualize the metric:

Time Series Chart

Time series displays how metric values change over time. Use a time series chart to identify trends, spikes, or other changes during the selected time range.

Time Series chart configuration with line display, point settings, stacking, and Y-axis options.

In the Visual section, customize how the chart displays data:

  • Click the Display dropdown menu to select Line or Bar. The default is Line.
  • In the Line Width field, enter the line thickness. The default is 1.25.
  • Click the Line Style dropdown menu to select Solid, Dashes, or Dots. The default is Solid.
  • In the Area Opacity field, enter the opacity of the area below each line. The default is 0.2.
  • Click the Show points dropdown menu to select Auto or Always. The default is Auto.
  • In the Point Radius field, enter the size of the points displayed on the line. The default is 2.75.
  • Click the Stack Series dropdown menu to select None or All. The default is None.
  • Enable the Connect Nulls toggle to connect lines across intervals with no data. This toggle is disabled by default.

In the Y-Axis section, enable or disable the Show toggle to display or hide the y-axis. This toggle is enabled by default.

When enabled, configure the y-axis using the following settings:

  • In the Label field, enter a label that describes the values shown on the y-axis.
  • Click the Format dropdown menu to select how values are displayed. Available formats include time, percentage, decimal, bytes, bits, throughput, currency, temperature, and date and time. The default is Decimal.
  • Enable the Short values toggle to abbreviate large values.
  • Click the Decimal places dropdown menu to select Default or specify between zero and four decimal places. The default is Default.
  • Click the Log Scale dropdown menu to select None, 2, or 10. The default is None.
  • In the Min field, enter the minimum value displayed on the y-axis. The default is Auto.
  • In the Max field, enter the maximum value displayed on the y-axis. The default is Auto.

In the Threshold section, configure visual thresholds for the chart:

  • Click the Mode dropdown menu to select Absolute or Percent. The default is Absolute.
  • In the Steps sub-section, configure the threshold steps. Each step contains a threshold value and color. Click + Add step to add another threshold. Then, enter the starting threshold value for the step, and then select the color used to represent it. Then, click + Add step to add another step, if needed. To delete a step, click Remove next to it.

In the Legend section, enable the Show legend toggle to display the chart legend. This toggle is disabled by default.

When enabled, configure the legend using the following settings:

  • Click the Position dropdown menu to select Bottom or Right. The default is Bottom.
  • Click the Mode dropdown menu to select List or Table. The default is List.
  • If you select Table, use the Legend columns field to select the values displayed in the table, such as the mean or minimum value.

In the Query Settings section, customize the appearance of individual queries. For each query, enable the Use custom settings toggle to override the chart’s default display settings. This toggle is disabled by default. If you haven’t created a query or need to add more, configure queries to select the metrics to display and define how their data is filtered, calculated, aggregated, and grouped.

When enabled, configure the following:

  • Click the Scale dropdown menu to select Linear or Logarithmic. The default is Linear.
  • Click the Units dropdown menu to select how query values are displayed. Available units include time, percent, decimal, bytes, bits, throughput, currency, temperature, and date and time. The default is Decimal.
  • Enable the Short values toggle to abbreviate large values. This toggle is enabled by default.
  • Click the Decimal places dropdown menu to select Default or specify between zero and four decimal places. The default is Default.
  • Click the Color mode dropdown menu to select Fixed or Fixed Single. The default is Fixed.
  • Next to Color, click the color to change the color used for the query.
  • Click the Line Style dropdown menu to select Solid, Dashes, or Dots. The default is Solid.
  • In the Area Opacity field, enter the opacity of the area below the query line. The default is 0.15.
Stat Chart

Stat displays a single calculated value. Use a stat chart to highlight a current value or summary, such as average CPU utilization.

Stat chart configuration with calculation, visual styles, sparkline, and legend options.
Note

Stat charts do not support configuring query settings separately for each query.

In the Data & Formatting section, configure how the stat value is calculated and displayed:

  • Click the Format dropdown menu to select how values are displayed. Available units include time, percent, decimal, bytes, bits, throughput, currency, temperature, and date and time. The default is Decimal.
  • Click the Decimal places dropdown menu to select Default or specify between zero and four decimal places. The default is Default.
  • Click the Calculation dropdown menu to select how the displayed value is calculated. The default is Last \*, which displays the most recent numeric value.

In the Visual style section, configure how the stat chart appears:

  • Click the Color mode dropdown menu, and then select None, Text, or Background. The default is Text.
  • Click the Font size dropdown menu, and then select Auto, 18px, 24px, 32px, 48px, or 56px. The default is Auto.
  • Enable Sparkline to display a small trend line for the metric behind the stat value. This is enabled by default.

In the Legend section, click the Legend mode dropdown menu to select Auto, On, or Off. The default is Auto, which shows the legend for multiple series only. On always shows it, while Off always hides it.

In the Threshold section, configure visual thresholds for the stat value:

  • Click the Mode dropdown menu to select Absolute or Percent. The default mode is Absolute.
  • Next to Default color, click the color to select the color used for values below the first configured threshold.
  • In the Steps sub-section, configure the threshold steps. Each step contains a threshold value and color. Click + Add step to add another threshold. Then, enter the starting threshold value for the step, and then select the color used to represent it. Then, click + Add step to add another step, if needed. To delete a step, click Remove next to it.

Afterward, configure queries to select the metrics to display and define how their data is filtered, calculated, aggregated, and grouped.

Gauge Chart

Gauge displays a value relative to a defined range or thresholds. Use a gauge to quickly determine whether a metric is within an expected range.

Gauge chart configuration with percentage formatting, calculation, maximum value, and color thresholds.
Note

Gauge charts do not support configuring query settings separately for each query.

In the Data & Formatting section, configure how the gauge value is calculated and displayed:

  • Click the Format dropdown menu to select how values are displayed. Available units include time, percent, decimal, bytes, bits, throughput, currency, temperature, and date and time. The default is Percent (0-100).
  • Click the Decimal places dropdown menu to select Default or specify between zero and four decimal places. The default is Default.
  • Click the Calculation dropdown menu to select how the displayed value is calculated. The default is Last \*, which displays the most recent numeric value.
  • In the Max Value field, enter the maximum value represented by the gauge. The default is Auto.

In the Threshold section, configure visual thresholds for the gauge value:

  • Click the Mode dropdown menu to select Absolute or Percent. The default mode is Absolute.
  • Next to the Default color, click the color to select the color used for values below the first configured threshold.
  • In the Steps sub-section, configure the threshold steps. Each step contains a threshold value and color. Click + Add step to add another threshold. Then, enter the starting threshold value for the step, and then select the color used to represent it. Then, click + Add step to add another step, if needed. To delete a step, click Remove next to it.

In the Legend section, enable the Show legend toggle to display the chart legend. This toggle is disabled by default.

Afterward, configure queries to select the metrics to display and define how their data is filtered, calculated, aggregated, and grouped.

Bar Chart

Bar chart displays metric values as bars. Use a bar chart to compare values across resources or groups.

Bar chart configuration with calculation, sorting, display mode, and orientation options.
Note

Bar charts do not support configuring query settings separately for each query.

In the Data & Formatting section, configure how the bar chart values are calculated and displayed:

  • Click the Format dropdown menu to select how values are displayed. Available units include time, percent, decimal, bytes, bits, throughput, currency, temperature, and date and time. The default is Decimal.
  • Click the Decimal places dropdown menu to select Default or specify between zero and four decimal places. The default is Default.
  • Click the Calculation dropdown menu to select how the bar chart calculates values from metric data. The default is Last, which displays the most recent data point for each series.
  • Click the Sort dropdown menu to select Ascending or Descending. The default is Descending.
  • Click the Mode dropdown menu to select Value or Percentage. The default is Value.
  • Click the Orientation dropdown menu to select Horizontal or Vertical. The default is Horizontal.

Afterward, configure queries to select the metrics to display and define how their data is filtered, calculated, aggregated, and grouped.

Pie Chart

Pie chart displays metric values as portions of a whole. Use a pie chart to compare the relative proportions of values across resources or groups.

Pie chart configuration with calculation, sorting, labels, and legend options.
Note

Pie charts do not support configuring query settings separately for each query.

In the Data & Formatting section, configure how the pie chart values are calculated and displayed:

  • Click the Calculation dropdown menu to select how the pie chart calculates values from metric data. The default is Last, which displays the most recent data point for each series.
  • Click the Format dropdown menu to select how values are displayed. Available units include time, percent, decimal, bytes, bits, throughput, currency, temperature, and date and time. The default is Decimal.
  • Enable the Short values toggle to abbreviate large values. This toggle is enabled by default.
  • Click the Decimal places dropdown menu to select Default or specify between zero and four decimal places. The default is Default.
  • Click the Sort dropdown menu to select Ascending or Descending. The default is Descending.
  • Click the Mode dropdown menu to select Value or Percentage. The default is Value.
  • Enable the Show labels toggle to display labels on the pie chart. This toggle is disabled by default. In the Legend section, enable the Show legend toggle to display the chart legend. This toggle is enabled by default. When enabled, configure the legend using the following settings:
  • Click the Position dropdown menu to select Bottom or Right. The default is Right.
  • Click the Mode dropdown menu to select List or Table. The default is List.
  • If you select Table, use the Legend columns field to select the values displayed in the table, such as the mean or minimum value.

Afterward, configure queries to select the metrics to display and define how their data is filtered, calculated, aggregated, and grouped.

Log Table

Log table displays log data in a table. Use a log table to review individual log entries and their associated fields.

Log Table configuration with maximum log entries, filters, and selectable columns.

In the Limits section, to configure how many log entries the table displays, in the Max log entries field, enter the maximum number of log entries to display. The default is 500, and Insights does not enforce a maximum value.

In the bottom-left, in the Table Settings panel, configure which log entries appear in the table and which columns are displayed.

In the Filters section, click + Filter to configure which log entries appear in the table.

In the Label field, enter the field or attribute you want to filter by.

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.

In the Columns section, click the checkboxes to show or hide the Body, Timestamp, and Severity columns.

Note

You cannot reorder the Timestamp column.

After configuring your log table, you can optionally add links to related resources or dashboards.

Markdown

Markdown displays formatted text on the dashboard. Use the Markdown option to add descriptions, instructions, links, or other contextual information.

Markdown configuration with a text editor and live chart preview.

In the bottom-left, use the Markdown text panel to enter content using Markdown syntax. For example:

## CPU Utilization

Monitor CPU utilization across production resources to identify usage trends, spikes, and sustained high CPU usage.

For more information about Markdown syntax, see the Markdown Guide.

After configuring your Markdown, you can optionally add links to related resources or dashboards.

Configure a Query

For metric chart types, in the bottom-left, the Queries panel contains the chart’s queries. Each metric chart requires at least one query to determine which metric data to retrieve and how to filter, calculate, aggregate, and group it.

You can configure metric queries using the dashboard’s JSON schema.

Note

Log table and Markdown do not use metric queries.

In the Mode section, select one of the following:

  • Visual builder lets you construct a metric query using Control Panel fields and controls without writing PromQL.
  • PromQL lets you write queries directly using Prometheus Query Language (PromQL) to filter, aggregate, calculate, and combine time-series metric data.
Use Visual Builder

In the Visual builder tab, you can build a metric query by selecting a metric, applying filters, and configuring aggregation and grouping options.

Chart query Visual Builder with metric selection, filters, aggregation, grouping, and PromQL preview.

In the Metric field, enter or select the metric you want to query. To change the selected metric, click x next to it, and then select another metric.

In the Filters section, click + Filter to configure which metrics appear in the table.

In the Label field, enter the field or attribute you want to filter by.

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.

In the Calculate over section, select the time window used for the calculation: 1m, 2m, 5m, or 10m. The default is 5m.

In the Aggregate as section, select either None, sum, avg, min, or max. The default is sum.

In the Group by section, click + Group by, and then enter or select a label, such as __resource_type__.

Click + Group by to add another label, if needed.

To remove a label, click x next to it. To remove all groups, click Clear all.

In the Legend field, enter the text displayed for the query in the chart legend and tooltip. Use {{label_name}} to interpolate label values. For example, {{__resource_type__}}.

The PromQL Preview field displays the PromQL generated from your Visual builder configuration. This field is read-only. For example:

avg by ("resource.urn") (
  avg_over_time({
    __name__="do.droplets.cpu_utilization"
  }[5m])
)
Use PromQL

Use the PromQL tab when you want to write the metric query directly.

Chart query editor in PromQL mode with a query field and legend configuration.

In the PromQL field, enter a valid PromQL expression. For information about PromQL syntax and query expressions, see the Prometheus querying documentation.

In the Legend field, enter the text displayed for the query in the chart legend and tooltip. Use {{label_name}} to interpolate label values. For example, {{__resource_type__}}.

To add another query, at the top of the Queries panel, click + next to the existing query tabs.

To manage the chart’s queries, in the bottom-left corner, you can add new queries, configure existing queries, or remove queries you no longer need:

  • Click Clone query to create a copy of the current query. Use this when you want to create a similar query and modify only some of its settings.
  • Click Delete query to remove the selected query.

At bottom of the right panel, in the Links section, add links to related resources, dashboards, or other destinations.

Alternatively, you can add chart links using the dashboard’s JSON schema.

Chart Links settings with URL, name, tooltip, and options to open in a new tab or render variables.

To add a link, click + Add link, and then in the URL field, enter the destination URL, such as https://cloud.digitalocean.com/droplets.

In the Name (optional) field, enter a descriptive name for the link, such as “View Droplets”.

In the Tooltip (optional) field, enter the text displayed when users hover over the link, such as “View and manage your Droplets in the Control Panel”.

Then, select the Open in new tab checkbox if you want to open the destination in a new browser tab.

Then, select the Render variables in URL checkbox if you want to replace variables in the URL with their current dashboard values.

Click + Add link to add another link, if needed.

If needed, click Remove link to delete the link.

Finalize

After creating a chart, click Add chart, and then manage your chart, if needed.

After organizing the chart within its group, in the top-right, click Save. If the dashboard contains chart groups, new charts appear in the first group at the top of the dashboard by default.

Manage a Chart Using the Control Panel

To manage a chart, find it in the dashboard, and then use the icons on the right to perform the following actions:

  • Click the expand icon to view the full chart.
  • Click the pencil icon to edit the chart’s configuration.
  • Click the copy icon to duplicate the chart.
  • Click the trash icon to delete the chart.
  • Click the drag icon to reposition the chart within the dashboard.

Add a Chart via JSON Schema

You can add a chart by defining it in spec.panels and adding a corresponding layout reference in spec.layouts.

To access the schema, open the dashboard’s JSON settings.

In the JSON editor, locate the spec.panels object and add a chart definition with a unique identifier. The following examples show the configuration for each available chart type.

The following example displays CPU utilization over time.

{
  "droplet-cpu-trend": {
    "kind": "Panel",
    "spec": {
      "display": {
        "name": "CPU Utilization"
      },
      "plugin": {
        "kind": "TimeSeriesChart",
        "spec": {
          "yAxis": {
            "label": "%",
            "format": {
              "unit": "percent",
              "decimalPlaces": 1
            }
          }
        }
      },
      "queries": [
        {
          "kind": "TimeSeriesQuery",
          "spec": {
            "plugin": {
              "kind": "MetricsTimeSeriesQuery",
              "spec": {
                "kind": "gauge",
                "filters": [],
                "groupBy": [],
                "metricName": "do.droplets.cpu_utilization",
                "aggregateAs": "avg",
                "seriesNameFormat": "CPU Utilization"
              }
            }
          }
        }
      ]
    }
  }
}

The following example displays the latest CPU utilization as a single value.

{
  "droplet-cpu-stat": {
    "kind": "Panel",
    "spec": {
      "display": {
        "name": "CPU Utilization"
      },
      "plugin": {
        "kind": "StatChart",
        "spec": {
          "format": {
            "unit": "percent",
            "decimalPlaces": 1
          },
          "calculation": "last-number",
          "colorMode": "none",
          "sparkline": {
            "color": "#2a78d6",
            "width": 2
          }
        }
      },
      "queries": [
        {
          "kind": "TimeSeriesQuery",
          "spec": {
            "plugin": {
              "kind": "MetricsTimeSeriesQuery",
              "spec": {
                "kind": "gauge",
                "filters": [],
                "groupBy": [],
                "metricName": "do.droplets.cpu_utilization",
                "aggregateAs": "avg",
                "seriesNameFormat": "CPU Utilization"
              }
            }
          }
        }
      ]
    }
  }
}

The following example displays CPU utilization as a gauge with thresholds at 70% and 90%.

{
  "droplet-cpu-gauge": {
    "kind": "Panel",
    "spec": {
      "display": {
        "name": "CPU Utilization"
      },
      "plugin": {
        "kind": "GaugeChart",
        "spec": {
          "calculation": "last-number",
          "format": {
            "unit": "percent"
          },
          "thresholds": {
            "defaultColor": "#22c55e",
            "steps": [
              {
                "value": 0,
                "color": "#22c55e"
              },
              {
                "value": 70,
                "color": "#f59e0b"
              },
              {
                "value": 90,
                "color": "#ef4444"
              }
            ]
          }
        }
      },
      "queries": [
        {
          "kind": "TimeSeriesQuery",
          "spec": {
            "plugin": {
              "kind": "MetricsTimeSeriesQuery",
              "spec": {
                "metricName": "do.droplets.cpu_utilization",
                "kind": "gauge",
                "aggregateAs": "avg",
                "filters": [],
                "groupBy": [],
                "seriesNameFormat": "CPU Utilization"
              }
            }
          }
        }
      ]
    }
  }
}

The calculation field determines which value the gauge displays. The format field specifies how the value is formatted, while thresholds defines the colors applied at different values.

The following example compares CPU utilization across Droplets.

{
  "droplet-cpu-bar": {
    "kind": "Panel",
    "spec": {
      "display": {
        "name": "CPU Utilization by Droplet"
      },
      "plugin": {
        "kind": "BarChart",
        "spec": {
          "calculation": "last",
          "format": {
            "unit": "percent",
            "decimalPlaces": 1
          },
          "sort": "desc",
          "mode": "value",
          "orientation": "horizontal",
          "groupBy": [],
          "isStacked": false
        }
      },
      "queries": [
        {
          "kind": "TimeSeriesQuery",
          "spec": {
            "plugin": {
              "kind": "MetricsTimeSeriesQuery",
              "spec": {
                "metricName": "do.droplets.cpu_utilization",
                "kind": "gauge",
                "aggregateAs": "avg",
                "filters": [],
                "groupBy": [
                  "resource.urn"
                ],
                "seriesNameFormat": "{{resource.urn}}"
              }
            }
          }
        }
      ]
    }
  }
}

The chart configuration supports the following settings:

  • calculation specifies how the displayed value is calculated.
  • format specifies the value format and whether large values are abbreviated.
  • sort specifies the order of the bars.
  • mode specifies whether bars display values or percentages.
  • orientation specifies whether the bars are horizontal or vertical.
  • groupBy configures chart-level grouping.
  • isStacked specifies whether bar values are stacked.

The following example displays CPU utilization across Droplets as portions of a pie chart.

{
  "droplet-cpu-pie": {
    "kind": "Panel",
    "spec": {
      "display": {
        "name": "CPU Utilization by Droplet"
      },
      "plugin": {
        "kind": "PieChart",
        "spec": {
          "calculation": "last",
          "format": {
            "unit": "percent",
            "decimalPlaces": 1
          },
          "mode": "value",
          "sort": "desc",
          "showLabels": false,
          "legend": {
            "position": "right",
            "mode": "list"
          }
        }
      },
      "queries": [
        {
          "kind": "TimeSeriesQuery",
          "spec": {
            "plugin": {
              "kind": "MetricsTimeSeriesQuery",
              "spec": {
                "metricName": "do.droplets.cpu_utilization",
                "kind": "gauge",
                "aggregateAs": "avg",
                "filters": [],
                "groupBy": [
                  "resource.urn"
                ],
                "seriesNameFormat": "{{resource.urn}}"
              }
            }
          }
        }
      ]
    }
  }
}

The chart configuration supports the following settings:

  • calculation specifies how the displayed value is calculated.
  • format specifies the value format.
  • mode specifies whether the chart displays values or percentages.
  • sort specifies the order of the slices.
  • showLabels controls whether labels appear on the slices.
  • legend.position specifies the legend’s position.
  • legend.mode specifies how the legend is displayed.

The following example displays application logs related to high CPU utilization in the production environment.

Note

This example assumes your application sends structured logs with environment and event_type attributes. CPU utilization metrics do not automatically generate corresponding log entries.

{
  "cpu-utilization-logs": {
    "kind": "Panel",
    "spec": {
      "display": {
        "name": "High CPU Utilization Logs"
      },
      "plugin": {
        "kind": "LogTable",
        "spec": {
          "activeColumns": [
            {
              "value": "timestamp",
              "label": "Timestamp"
            },
            {
              "value": "severity_text",
              "label": "Severity"
            },
            {
              "value": "body",
              "label": "Body"
            }
          ],
          "filters": [
            {
              "key": "attributes:environment",
              "operator": "$eq",
              "value": "production"
            },
            {
              "key": "attributes:event_type",
              "operator": "$eq",
              "value": "high_cpu_utilization"
            }
          ],
          "maxLogEntries": 500
        }
      }
    }
  }
}

The configuration defines the following:

  • activeColumns specifies which log fields appear as columns.
  • filters contains the conditions used to filter log entries. Each filter specifies an attribute, operator, and value.
  • maxLogEntries specifies the maximum number of entries displayed in the table.
Note

Log tables do not use metric queries. Configure their filtering directly in spec.plugin.spec.filters.

The following example adds Markdown containing a heading and description for monitoring CPU utilization across production Droplets.

{
  "cpu-utilization-notes": {
    "kind": "Panel",
    "spec": {
      "display": {
        "name": "CPU Utilization Notes"
      },
      "plugin": {
        "kind": "Markdown",
        "spec": {
          "text": "## CPU Utilization\n\nMonitor CPU utilization across production Droplets to identify usage trends, spikes, and sustained high CPU usage."
        }
      }
    }
  }
}

Use spec.plugin.spec.text to define the Markdown content. Use \n to insert line breaks.

Note

Markdown does not use metric queries.

Add the selected chart definition to the existing spec.panels object without replacing any existing panels. Each panel must have a unique identifier.

Next, locate the group in spec.layouts where you want the chart to appear.

Add an entry to its spec.items array that references the new panel. For example:

{
  "x": 0,
  "y": 0,
  "width": 6,
  "height": 5,
  "content": {
    "$ref": "#/spec/panels/droplet-cpu-trend"
  }
}

The layout entry defines the following:

  • x and y specify the chart’s position in the grid.
  • width and height specify the chart’s dimensions.
  • content.$ref references the chart definition in spec.panels.

Replace droplet-cpu-trend with the identifier of the chart you added. The identifier in content.$ref must match the corresponding key in spec.panels.

Adjust the chart’s position and dimensions to fit the group without overlapping other charts.

After configuring the chart, click Apply.

To save your changes, in the top-right corner, click x to close the settings page, then in the top-right corner of the dashboard, click Save.

Configure a Query via JSON Schema

You can configure the metric data displayed in a chart by modifying its queries in the dashboard’s JSON schema. Queries define which metrics to retrieve, how to filter and aggregate their values, and how to group the results.

To access the schema, open the dashboard’s JSON settings.

In the JSON editor, locate the chart in spec.panels, and then find its spec.queries array. Each metric chart requires at least one query. You can add multiple query objects to display or compare different metric series.

You can configure queries using metric query settings or PromQL expressions.

The following example queries Droplet CPU utilization, excludes a specific Droplet, and groups the results by resource to compare CPU utilization across the remaining Droplets.

{
  "kind": "TimeSeriesQuery",
  "spec": {
    "plugin": {
      "kind": "MetricsTimeSeriesQuery",
      "spec": {
        "metricName": "do.droplets.cpu_utilization",
        "kind": "gauge",
        "aggregateAs": "avg",
        "filters": [
          {
            "key": "resource.urn",
            "namespace": "attributes",
            "operator": "!=",
            "value": "do:droplet:123456789"
          }
        ],
        "groupBy": [
          "resource.urn"
        ],
        "seriesNameFormat": "{{resource.urn}}"
      }
    }
  }
}

The query configuration contains the following fields:

  • metricName specifies the metric to retrieve.
  • kind identifies the metric type, such as gauge or counter.
  • aggregateAs specifies how values are aggregated, such as sum, avg, min, or max.
  • filters contains the conditions used to narrow the metric data. Each filter specifies an attribute, operator, and value.
  • groupBy specifies the attributes used to group the results.
  • calculateOver specifies the time window used for calculations.
  • seriesNameFormat specifies the name displayed for the resulting metric series. You can reference attribute values using expressions such as {{resource.urn}}.

The following example uses Prometheus Query Language (PromQL) to calculate average CPU utilization for each Droplet over a five-minute interval.

{
  "kind": "TimeSeriesQuery",
  "spec": {
    "plugin": {
      "kind": "PrometheusTimeSeriesQuery",
      "spec": {
        "query": "avg by (\"resource.urn\")(avg_over_time({__name__=\"do.droplets.cpu_utilization\"}[5m]))"
      }
    }
  }
}

Use spec.plugin.spec.query to enter a valid PromQL expression. For information about supported query syntax, see the Prometheus querying documentation.

To add another metric query, add another query object to the chart’s spec.queries array. To modify an existing query, update its plugin configuration. To remove a query, delete its object from the array.

After configuring your queries, click Apply.

To save your changes, in the top-right corner, click x to close the settings page, then in the top-right corner of the dashboard, click Save.

You can add links to a chart through the dashboard’s JSON schema. Links let you navigate to related resources, dashboards, or external destinations.

To access the schema, open the dashboard’s JSON settings.

In the JSON editor, locate the chart in spec.panels, and then add or modify the spec.links array.

For example, the following configuration adds a link to the Metrics tab in DigitalOcean Insights, where you can explore Droplet CPU utilization:

{
  "links": [
    {
      "url": "https://cloud.digitalocean.com/insights/metrics",
      "name": "View CPU Utilization Metrics",
      "tooltip": "Explore Droplet CPU utilization in Insights",
      "renderVariables": false,
      "targetBlank": true
    }
  ]
}

The configuration defines the following:

  • url specifies the destination URL.
  • name specifies the link’s display name.
  • tooltip specifies the text displayed when hovering over the link.
  • renderVariables determines whether dashboard variables are replaced with their current values in the URL. Set to true to enable variable substitution or false to use the URL as written.
  • targetBlank determines whether the link opens in a new browser tab. Set to true to open a new tab or false to open the link in the current tab.

To add multiple links, add another object to the spec.links array. To remove a link, delete the corresponding object.

After configuring your links, click Apply.

To save your changes, in the top-right corner, click x to close the settings page, then in the top-right corner of the dashboard, click Save.

Manage a Chart via JSON Schema

You can modify a chart’s display settings, visualization, metric queries, and position by editing its JSON configuration.

To access the schema, open the dashboard’s JSON settings.

In the JSON editor, locate the chart definition in spec.panels. Each chart has a unique identifier that is referenced by an entry in spec.layouts.

You can update the following fields:

  • Name and description: Edit spec.display.name and spec.display.description.
  • Visualization: Edit spec.plugin.kind to change the chart type and update spec.plugin.spec with the corresponding visualization settings.
  • Metric queries: Edit spec.queries to change the metrics, filters, grouping, and aggregation settings.
  • Position and dimensions: Update the chart’s x, y, width, and height fields in its layout entry.
  • Group: Move the chart’s layout entry to another group’s spec.items array. Keep the same content.$ref value to reuse the existing panel definition.

For example, a chart using the MetricsTimeSeriesQuery plugin can specify Droplet CPU utilization and its aggregation settings:

{
  "kind": "gauge",
  "filters": [],
  "groupBy": [],
  "metricName": "do.droplets.cpu_utilization",
  "aggregateAs": "avg",
  "seriesNameFormat": "CPU Utilization"
}

To change the metric displayed, update metricName. To change how the metric values are aggregated, update aggregateAs. The available query settings depend on the query plugin.

To remove a chart, delete its entry from the corresponding group’s spec.items array. Then, remove its definition from spec.panels if no other layout references it.

After editing the schema, click Apply. To save your changes, close the settings page, then in the top-right corner of the dashboard, click Save.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.