Connect Promscale and Grafana
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 Promscale, install and run Grafana version 5.3 or later. For information about installing Grafana, see the Grafana installation documentation.
This section shows you how to connect Promscale to Prometheus, Jaeger, and PostgreSQL data sources in Grafana.
Configure Promscale as Prometheus data source
Prometheus collects and stores metrics as time-series data. To configure Promscale as Prometheus data source you need the IP address of the Promscale instance.
Configuring Promscale as Prometheus data source
- 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
Prometheus
in the search field and clickSelect
. - Configure the data source:
- In the
Name
field, typePromscale-PromQL
. - In the
URL
field, typehttp://<PROMSCALE-IP-ADDR>:9201
, where<PROMSCALE-IP-ADDR>
is the IP address of the Promscale instance. - Use the default values for all other settings.
- In the
When you have configured Promscale as a Prometheus data source in Grafana, you can create panels that are populated with data using PromQL.
Configure Promscale as Jaeger data source
Jaeger is an open source distributed tracing system used for monitoring and troubleshooting microservices-based distributed systems. To configure Promscale as Jaeger data source you need the IP address of the Promscale instance.
Configuring Promscale as Jaeger data source
- 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
Jaeger
in the search field and clickSelect
. - Configure the data source settings:
- In the
Name
field, typePromscale-Jaeger
. - In the
URL
field, typehttp://<PROMSCALE-IP-ADDR>:9201
, where<PROMSCALE-IP-ADDR>
is the IP address of the Promscale instance. - Use the default values for all other settings.
- In the
You can now filter and view traces stored in Promscale using Grafana. To visualize your traces, click the Explore button to see the traces filtering panel.
Configure Promscale as a PostgreSQL data source
PostgreSQL is an open source object-relational database system that uses and extends the SQL language. To configure Promscale as a PostgreSQL data source you need details such as host, port, database, user, and password of the underlying TimescaleDB or PostgreSQL database used by Promscale.
Configuring Promscale as a PostgreSQL data source
- 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 click
Select
. - Configure the data source settings:
- In the
Name
field, typePromscale-SQL
. - In the
Host
field, type the IP address or hostname and optional port of your TimescaleDB or PostgreSQL instance. - In the
Database
field, type the name of the PostgreSQL database. The default database istsdb
. - In the
User
andPassword
fields, type theuser name
and thepassword
for the database. - In the
TLS/SSL Mode
selectrequire
. This determines whether or with what priority a secure SSL TCP/IP connection is negotiated with the server. - In the
TLS/SSL Method
selectfile system path
. This determines whether the SSL Auth details are configured as a file path or file content. - Use the default values for all other settings.
- In the
PostgreSQL details
section, enableTimescaleDB
. Grafana usestime_bucket
in the$__timeGroup
macro to display TimescaleDB specific aggregate functions in the query builder.
- In the
You can now create panels that use Promscale as a PostgreSQL data source, using SQL queries to feed the chart.