This section briefly describes how to add, configure, and query data sources. For more information, please refer to Grafana data sources.

Before creating a Dashboard, you must first add a data source. The Grafana for WizTelemetry extension automatically adds the Prometheus server address as a data source by default. You can also add your own data sources, such as Loki, Elasticsearch, InfluxDB, PostgreSQL, MySQL, etc.

After adding a data source, you can:

  • Query data using Explore.

  • Visualize data in panels.

  • Create alerting rules.

Prerequisites

Only users with the admin role in the Grafana console can add or delete data sources.

Add a Data Source

  1. After logging into the Grafana console, click Connections in the left navigation pane.

  2. Search for a data source, such as loki.

  3. Click the data source name to enter the data source overview page.

  4. Click Add new data source in the upper right corner to enter the data source configuration page.

  5. Enter the server address of the data source and click Save & test at the bottom to complete the addition and configuration of the data source.

    loki-data-source

Query Data Source Data

Set query conditions to retrieve data for specific metrics within a time range from the data source.

  1. Click Explore in the left navigation pane and select the data source at the top.

  2. In the query editor, enter or select a Metric, set Label filters, and then click Run query in the upper right corner.

    explore

Delete a Data Source

  1. Click Connections > Data sources in the left navigation pane.

  2. Click the name of the data source you want to delete to enter the data source configuration page.

  3. Click Delete at the bottom to delete the data source.