A query returns data that Grafana visualizes in dashboards. After you create a panel and reports, Grafana automatically picks the default data source.

Procedure

  1. Click Dashboards and Reports.
  2. From the left pane, click the dashboard for which you want to add a query.
  3. Hover the mouse over the panel in which you want to add a query and click the vertical ellipse.
  4. Click Edit.
  5. Click the Data source drop-down menu, and select the data source.
  6. Click + Add Query.
  7. Click Query options to configure the maximum number of data points returned by the query and how frequently you want the query to request data from the data source.
  8. In the Query field, define the query as required.
  9. In the Metric field, select the required metrics.
  10. In the Group by field, select the parameters as required.
  11. Click Apply.