Set up TimescaleDB and Grafana

This tutorial uses Timescale Cloud to set up your database, and to set up Grafana. You can create a free account to try it out.

Create a new service for Grafana

You need to sign in to your Timescale Cloud account to create a new service to run Grafana.

Procedure: Creating a new service for Grafana

  1. Log in to your Timescale Cloud account. By default, you start in the Services view, showing any services you currently have in your project.
  2. Click Create a new service.
  3. In the Select your service section, click TimescaleDB Grafana - Metrics dashboard:
  4. In the Select your cloud service provider and Select your cloud service region sections, choose the provider and region that you prefer, or accept the default values.
  5. In the Select your service plan section, click Dashboard-1.
  6. In the Provide your service name section, type a name for your new service. In this example, we've used grafana-tutorial.
  7. When you are happy with your selections, click Create Service to go back
    to the Services view while your service is created. The status indicator says Rebuilding while the service is created. It is ready for you to use when the indicator is green and says Running. This usually takes a couple of minutes, but different clouds can vary. You can click the service name in the list to see more information and make changes.

Log in to your Timescale Cloud Grafana service

When your service is built, you can log and set up your data services.

Logging in to your Timescale Cloud Grafana service

  1. In the Timescale Cloud account Services view, click the name of your new Grafana service.
  2. On the service details page, take a note of the user name and password for your service, and click the link in the Service URI field to open Grafana:
  3. Log in to Grafana with your service credentials.

Connect Grafana to your TimescaleDB instance

Now you have your Grafana service up and running, you can configure Grafana to connect to your TimescaleDB instance.

Connecting Grafana to your TimescaleDB instance

  1. In Grafana, click Configuration → Data Sources in the left menu bar.
  2. Click Add Data Source and choose the PostgreSQL option in the SQL group:
  3. On the data sources configuration page, complete these details:
    • In the Name field, type a name for the data source. In this example, we used tsdb-grafana-tutorial.
    • In the Host field, type the Service URI for your service, add a colon at the end, and then type the port number. In this example, we used
    • In the Database field, type the name of your Grafana service. In this example, we used grafana-tutorial.
    • In the User field, type the user name for your Grafana service.
    • In the Password field, type the password for your Grafana service.
  4. In the PostgreSQL details section, in the TimescaleDB field, toggle the switch on:
  5. Click Save & Test. You can confirm your data source is working by clicking Back, and checking that your service is listed correctly.

Found an issue on this page?

Report an issue!


Related Content