I have installed Grafana 8.4.4. Enterprise in Windows 10 Pro and I am trying to connect to a Timescale database (postgreSQL).
First I tried to connect to Timescale Cloud (Managed Service for TimescaleDB), which uses Timescale version 2.6.0.
In Timescale Cloud service page I can see these credentials:
- Host:
<host-string>
- Port:
10250
- User:
tsdbadmin
- Password:
<timescale-cloud-service-password>
- Service URI:
postgres://tsdbadmin:<timescale-cloud-service-password>@<host-string>:10250/defaultdb?sslmode=require
- SSL mode:
require
- Allowed IP addresses:
0.0.0.0/0
- PostgreSQL version: 14.2
The database name is: periodic-measurements
I have also copied the CA Certificate.
In the Timescale Cloud Data Source in Grafana I have the following configurations:
- Host:
<host-string>:10250
- Database:
periodic-measurements
- User:
tsdbadmin
- Password:
<timescale-cloud-service-password>
- TLS/SSL Mode:
require
- TLS/SSL Method:
Certificate content
- CA Cert:
<CA Certificate>
- Version:
12+
- TimescaleDB:
enabled
When clicking Save & Test I get:
Query data error
Then, I tried to connect to the Timescale database (postgreSQL version 14.2, Timescale version 2.6.0) contained in my local Linux instance (Linux Ubuntu 18.04 on VirtualBox on top of my Windows 10).
From my local Linux terminal I get into the database as follows:
$ psql -h localhost -p 5432 -U db_owner testdb
by using the password <timescale-local-password>
.
In my local Linux instance in /etc/postgresql/14/main/pg_hba.conf
I have the following line:
# IPv4 local connections:
# TYPE DATABASE USER ADDRESS METHOD
host all all 0.0.0.0/0 scram-sha-256
In Virtual Box in Settings > Network, I have selected Bridged Adapter. In Linux, ifconfig gives me the following:
enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.30.129 netmask 255.255.255.0 broadcast 192.168.30.255
inet6 fe80::c757:3763:9a7d:e2f1 prefixlen 64 scopeid 0x20<link>
ether 08:00:27:d0:6c:9c txqueuelen 1000 (Ethernet)
RX packets 76 bytes 23686 (23.6 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 119 bytes 13263 (13.2 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
In the Timescale Local Data Source in Grafana I have the following configurations:
- Host:
192.168.30.129:5432
- Database:
testdb
- User:
db_omver
- Password:
<timescale-local-password>
- TLS/SSL Mode:
disable
- Version:
12+
- TimescaleDB:
enabled
When clicking Save & Test I get:
Database Connection OK
Note also that, by using my Grafana installation in my Linux local instance, I can successfully connect to Timescale Cloud.
Any hint what could be wrong in the connection to Timescale Cloud from Windows Grafana?
Thanks,
Bernardo