Open karlism opened 3 years ago
Sorry, it looks like I missed your issue for some time.
This looks like a small issue indeed.
To determine which database driver to use, I split the string by ://
, and only pass the righthand side to the database driver.
libpq on the other hand expects the full DSN to be passed, or a list of option=value
, separated by spaces, which I guess where the weird error message comes from.
The second DSN is probably also not handled correctly, but you have an option named bareos:bareospw@localhost/bareos?readOnly
with value true
(which is then just ignored by the driver, and it defaults to connect to localhost.
Hello,
There is an issue with DSN string handling, let me show you an example:
It is perfectly valid URL, but
bareos_exporter
expects it to have=
symbol in it. If I add additional connection parameters, it is working fine (the system is not running PostgreSQL locally, soconnection refused
is fine in this case):