All Products
Search
Document Center

Configure a data source in the Grafana Console

Last Updated: May 19, 2022

TSDB for InfluxDB® supports the standard query features of Prometheus. You can use PromQL to query data that is stored in your TSDB for InfluxDB® database. This topic describes how to configure a Grafana data source. After a data source is created, you can use PromQL to query data from the data source.

Background

Prometheus has become the de facto standard in the cloud native monitoring industry. The storage capabilities of TSDB for InfluxDB® can provide long-term storage services for data that is monitored by using Prometheus. The remote read API that is provided by Prometheus can be called to query data directly from TSDB for InfluxDB® databases. In this mode, the network link is long. If a large amount of data is queried, the memory usage of your TSDB for InfluxDB® database and Prometheus server is high. If you use Grafana, you can set the URL of your Grafana data source to the URL of your TSDB for InfluxDB® instance. The following figure shows the technical architecture.

arch

In the TSDB for InfluxDB® console, you can update the version of the engine that is used by your TSDB for InfluxDB® instance to the latest version. This way, you can use the latest features.

Prerequisites

The Grafana client is installed and connected to your TSDB for InfluxDB®️ instance. For more information, see Connect Grafana to a TSDB for InfluxDB®️ instance.

Configure a data source

In the Grafana console, you can create a data source or update an existing data source, and set the URL of the data source to the URL of your TSDB for InfluxDB®️ instance. Then, you can use PromQL to query data from databases in the TSDB for InfluxDB®️ instance. If you use an existing data source, you do not need to update the dashboard.

  1. On the homepage of Grafana, click Add your first data source.

  2. On the Data Sources page, select Prometheus.

  3. On the Settings tab, configure the parameters that are described in the following table and then click Save & test.

Image 002

Parameter

Description

URL

Enter the private endpoint or the public endpoint of your TSDB for InfluxDB®️ instance.

Auth

Select Basic auth.

Basic Auth Details

Enter the username and password of the account that is used to connect to your TSDB for InfluxDB® database.

Custom query parameters

Enter the name of the TSDB for InfluxDB® database from which you want to query data.