You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 25, 2022. It is now read-only.
There is an issue with DSN string handling, let me show you an example:
$ ./bareos_exporter -dsn=postgres://bareos:bareospw@localhost/bareos
panic: missing "=" after "bareos:bareospw@localhost/bareos" in connection info string"
goroutine 1 [running]:
main.main()
/github/workspace/main.go:52 +0x46d
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, so connection refused is fine in this case):
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.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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):The text was updated successfully, but these errors were encountered: