Problem with Postgres configuration

  • What Grafana version and what operating system are you using?

Grafana Version 10.1.4 on SLES 15

  • What are you trying to achieve?

Set up Postgresql as a database

  • How are you trying to achieve it?

Editing the grafana.ini file

  • What happened?

In the logs, I see:

Oct 13 14:11:29 dashboards grafana[13116]: Error: ✗ failed to connect to database: parse "postgresql://grafana:pass@localhost/grafana": invalid port ":8T])." after host

  • What did you expect to happen?

Successful connection

  • Can you copy/paste the configuration(s) that you are having problems with?
# Either "mysql", "postgres" or "sqlite3", it's your choice
type = postgres
host = <IP>:5432
name = grafana
user = grafana
# If the password contains # or ; you have to wrap it with triple quotes. Ex """#password;"""
password = pass

# Use either URL or the previous fields to configure the database
# Example: mysql://user:secret@host:port/database
url = postgres://grafana:pass@<IP>:5432/grafana