title | excerpt | products | keywords | |||||
---|---|---|---|---|---|---|---|---|
Connect TimescaleDB and Grafana |
Connect Timescale to Grafana to visualize your data |
|
|
Grafana ships with built-in Prometheus, PostgreSQL, Jaeger, and other data source plugins that allow you to query and visualize data from a compatible database. To add a data source in Grafana you must be signed as a user with organization administration role privileges.
To connect Grafana with Timescale, start by installing Grafana. For more information about installing Grafana, see the Grafana documentation.
Alternatively, to connect your Grafana service on Managed Service for TimescaleDB with your Timescale service, create a Grafana service on Managed Service for TimescaleDB. You can try it for free for 30 days.
This section shows you how to connect Timescale as a data source in Grafana.
To configure Timescale as a data source you need to create a service, and then configure Timescale as the data source in Grafana.
- Sign in to the Timescale portal.
- Click
Create service
. - Click
Download the cheatsheet
. This.sql
file contains the credentials that you require to configure TimescaleDB as a data source on Grafana.
To configure TimescaleDB service on Timescale with your Grafana installation, log in to Grafana and proceed to step 5 in this procedure.
- Sign in to your Managed Service for Timescale account, and click the name of your new Grafana service.
- On the service details page, take a note of the
User
andPassword
field for your service. - Click the link in the
Service URI
field to open Grafana. - Log in to Grafana with your service credentials.
- Navigate to
Configuration
→Data sources
. The data sources page lists previously configured data sources for the Grafana instance. - Click
Add data source
to see a list of all supported data sources. - Type
PostgreSQL
in the search field and clickSelect
. - Configure the data source:
- In the
Name
field, type name that you would like for dataset on TimescaleDB. - In the
PostgreSQL Connection
section, type theDatabase
,User
, andPassword
fields using the.sql
file that you downloaded when creating the TimescaleDB service. - In the
Host
type<HOST>:<PORT>
from the.sql
file that you downloaded. - Set
TLS/SSL Mode
asrequire
. - In
PostgreSQL details
enableTimescaleDB
- In the
- Click
Save & test
button. If the connection is successfulDatabase Connection OK
appears.
When you have configured TimescaleDB as a data source in Grafana, you can create panels that are populated with data using SQL.