Skip to main content

Visualize with Grafana

Grafana is a multi-platform open source analytics and monitoring solution. The Cloud Intelligence datasource plugin, published in the Grafana plugin catalog, lets you query your Cloud Analytics report data live from Grafana, so you can get a single pane of glass that presents events, cloud costs, and alerts. The plugin is signed by Grafana Labs and runs on Grafana Cloud and on self-managed Grafana.

Panels built with the plugin respect the Grafana time picker, support template variables, and always show current data — no manual JSON parsing or UQL queries required.

This tutorial demonstrates how to connect Grafana to your DoiT data and visualize a Cloud Analytics report.

The following example shows a Cloud Intelligence dashboard imported into Grafana:

Cloud Intelligence dashboard in Grafana

Prerequisites​

  • You have a DoiT API token whose scope includes the Cloud Analytics User permission. A service account API token is recommended so the data source keeps working when team members change roles; a personal API token also works.

  • You have a Grafana Cloud stack or a self-managed Grafana instance running Grafana 12.3 or later, with permission to install plugins, and you are familiar with Grafana visualization.

Step 1: Install the plugin​

The plugin is available in the Grafana plugin catalog, so you can install it directly from Grafana.

  1. In Grafana, go to Administration > Plugins and data > Plugins.

  2. Search for Cloud Intelligence and select the DoiT Cloud Intelligence data source plugin.

  3. Select Install. On Grafana Cloud the plugin is ready within a few minutes; on self-managed Grafana, restart Grafana if your instance requires it.

Note

On self-managed Grafana you can also install the plugin from the command line and then restart Grafana:

grafana cli plugins install doitintl-doitcloudintelligence-datasource

Dashboards that contain treemap reports also require the Grafana Treemap panel plugin (marcusolsson-treemap-panel). Install it the same way before importing the dashboard; otherwise, Grafana marks the treemap panels as unavailable.

Step 2: Configure the datasource​

  1. In Grafana, go to Connections > Data sources > Add new data source and select DoiT Cloud Intelligence.

  2. Paste your DoiT API token in the API Key field. Leave the API URL at its default value (https://api.doit.com) unless instructed otherwise.

  3. Select Save & test. Grafana verifies connectivity against the DoiT API.

Tip

If Save & test reports that authentication failed or access was denied, check that the token's scope includes the Cloud Analytics User permission. Service accounts can only query reports that are shared with the organization or preset reports; share private reports before using them in Grafana.

Step 3: Add a panel​

  1. Add a new panel in your dashboard and select the DoiT Cloud Intelligence datasource.

  2. Choose a query type:

    • Saved report: Pick one of your Cloud Analytics reports from the Report dropdown. Leave Use dashboard time enabled to have the panel follow the dashboard time picker, or disable it to use the time range saved in the report.

    • Ad-hoc query: Build a query directly in Grafana — select a Metric, a Time interval, and the dimensions to Group by. Ad-hoc queries total the selected metric over the last 30 days and do not follow the dashboard time picker. To filter or aggregate differently, create a report in the console and use it as a saved report.

  3. Select a visualization. Time-series reports render as time series panels, tabular reports render as tables, and treemap reports render with the Grafana Treemap panel plugin.

Tip

Instead of building panels manually, you can export a ready-made dashboard from the console: open any Cloud Analytics report, select the three-dots menu, and choose Open in Grafana. Then import the downloaded JSON in Grafana via Dashboards > New > Import.

Step 4: Use template variables (optional)​

The plugin supports Grafana template variables for building interactive dashboards:

  • reports(): returns your Cloud Analytics reports, so a dashboard variable can switch the report a panel displays.

  • dimension_values(<type>, <id>): returns the values of a dimension, for example dimension_values(fixed, cloud_provider), so viewers can filter panels by account, service, or any other dimension.

See also​