How to query GraphQL data on Grafana Cloud

With the Azion GraphQL API, you can visualize your data on Grafana Cloud by using the GraphQL Data Source and adding queries with the available datasets and variables.

To use GraphQL on Grafana Cloud, you need:

Installing the GraphQL data source on Grafana Cloud

Section titled Installing the GraphQL data source on Grafana Cloud

After you’ve finished setting up the Azion requirements and you have access to Grafana, follow the next steps:

  1. Log in to your Grafana account.
  2. Go to the GraphQL Data Source page.
  3. On the top menu, select the Installation tab.
  4. On the For field, select the Grafana instance you want to install the plugin on.
  5. Click the Install plugin button.

For more information, see Grafana’s documentation on plugin installation.

You can also use CLI to install a plugin.

If you access your instance directly through its link, go directly to the steps related to access on the left menu. If you’ve created an account on Grafana’s website, go to the My Account environment and follow the next steps:

  1. On the Overview page of your Grafana Cloud Portal, on the second section, you’ll see the name of your stack.
  2. On the Grafana card, click Launch.

Your stack opens on another page.

  1. On the left-side menu, on the Connections dropdown menu, select Add new connection.
  2. On the Search box, type GraphQL Data Source; it’ll appear under Data sources.
  3. Select the GraphQL Data Source card.
  4. Click the Create a GraphQL Data Source data source button. A new page opens to configure your data source.

With the GraphQL Data Source page opened on Grafana Cloud, on the Settings tab:

  1. On Name, give a descriptive name to your data source.

  2. Under HTTP:

    • On URL, add either or
    • On Custom HTTP Headers, click + Add header two times.
    • On the first Header, on the first field, add Authorization, and on the second field add your Azion Console personal token. It looks similar to: Token azionfkr40c7rp75d7df21e18d5c19el8f01
    • On the second Header, on the first field, add Content-Type, and on the second field add application/json.
  3. Click Save & test. Grafana will run a quick test to see if your authentication is correct.

  1. On the left-side menu, click on Dashboards. The dashboard page opens.
  2. Next to the search bar, click New > New dashboard or Import.

If you pick New dashboard:

  1. On the panel, select + Add visualization.
  2. From the data source list, select GraphQL Data Source.
  3. On the query box, add the Azion GraphQL API query you want to use.

If you pick Import:

  1. On the Import dashboard page, choose an option:
  • Upload a JSON file on the Upload dashboard JSON file card.
  • Upload a JSON through Import via
  • Upload a JSON through Import via panel json.
  1. Click the Import or Load button, depending on your previous choice.

You can customize your dashboard using the right-side panel. You can change the type of chart from time series to bar chart, for example, the legends of the chart, or even the graph style. Grafana also has other features such as annotations.

See the Data Transferred dashboard on Grafana JSON example for a ready-to-use dashboard.

Grafana Cloud is a trademark of Grafana Labs. We are not affiliated with, endorsed or sponsored by Grafana Labs or its affiliates.