Path

Welcome to the Grafana learning path that shows you how to connect Grafana Cloud to an existing PostgreSQL database and query your data.

Estimated time: 11 min

Connect to a PostgreSQL data source in Grafana Cloud

Welcome to the Grafana learning path that provides best practices for configuring a PostgreSQL data source.

PostgreSQL is one of the world’s most popular open source relational databases. The PostgreSQL data source lets you query and visualize data from any PostgreSQL-compatible database directly within Grafana, so you can build dashboards from database metrics, application data, and business intelligence insights. It also works with managed services such as Amazon RDS, Amazon Aurora, Azure Database for PostgreSQL, and Google Cloud SQL.

This path teaches you how to configure the data source that enables you to query, visualize, and create dashboards with data from your PostgreSQL database.

Here’s what to expect

When you complete this path, you’ll be able to:

  • Create a dedicated read-only Grafana user in your PostgreSQL database
  • Add the PostgreSQL data source in Grafana Cloud
  • Enter the connection details and credentials, and choose a TLS/SSL mode, for your PostgreSQL server
  • Select a private data source connect (PDC) agent and test the database connection
  • Verify that your PostgreSQL data appears in Grafana Cloud with a test query

Before you begin

Before you connect to a PostgreSQL data source, ensure you have:

  • A PostgreSQL server (version 9.0 or newer) that’s up and running.
  • Access to a PostgreSQL database with data you want to visualize.
  • Connection details including host, port, database name, username, and password.
  • The Organization administrator role in Grafana to configure the data source.
  • Network access for the PostgreSQL server (the default port is 5432).
  • Your TLS/SSL certificates and client keys ready, if you connect with TLS/SSL.
  • Created a private connection to a data source with the PDC agent running, if your database is on a private network.

Troubleshooting

If you get stuck, we’ve got your back! Where appropriate, troubleshooting information is just a click away.

More to explore

We understand you might want to explore other capabilities not strictly on this path. We’ll provide you opportunities where it makes sense.

Are you ready?