Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No error is reported when user queries file is not valid #342

Open
ikorolev93 opened this issue Dec 2, 2019 · 2 comments
Open

No error is reported when user queries file is not valid #342

ikorolev93 opened this issue Dec 2, 2019 · 2 comments

Comments

@ikorolev93
Copy link

https://github.com/wrouesnel/postgres_exporter/blob/aeec47ead4ad3941cf1b6588b1ac5a44ca9e9c4b/cmd/postgres_exporter/postgres_exporter.go#L542-L546

Not sure if it's supposed to return err and log it somewhere else, or return nil and log it right here, since it is being ignored otherwise.

@patsevanton
Copy link

/usr/bin/postgres_exporter --version
postgres_exporter v0.8.0 (built with go1.11)
DATA_SOURCE_NAME="user=postgres host=/var/run/postgresql/ sslmode=disable" /usr/bin/postgres_exporter --extend.query-path=/etc/prometheus/postgres_exporter_queries.yaml --log.level="debug"
INFO[0000] Established new database connection to "/var/run/postgresql/:5432".  source="postgres_exporter.go:878"
DEBU[0000] Querying Postgres Version on "/var/run/postgresql/:5432"  source="postgres_exporter.go:1388"
INFO[0000] Semantic Version Changed on "/var/run/postgresql/:5432": 0.0.0 -> 9.6.15  source="postgres_exporter.go:1405"
DEBU[0000] flush_lsn is being forced to discard due to version incompatibility.  source="postgres_exporter.go:596"
DEBU[0000] pg_current_wal_lsn_bytes is being forced to discard due to version incompatibility.  source="postgres_exporter.go:596"
DEBU[0000] pg_current_wal_lsn is being forced to discard due to version incompatibility.  source="postgres_exporter.go:596"
DEBU[0000] sent_lsn is being forced to discard due to version incompatibility.  source="postgres_exporter.go:596"
DEBU[0000] write_lag is being forced to discard due to version incompatibility.  source="postgres_exporter.go:596"
DEBU[0000] write_lsn is being forced to discard due to version incompatibility.  source="postgres_exporter.go:596"
DEBU[0000] procpid is being forced to discard due to version incompatibility.  source="postgres_exporter.go:596"
DEBU[0000] replay_lsn is being forced to discard due to version incompatibility.  source="postgres_exporter.go:596"
DEBU[0000] pg_wal_lsn_diff is being forced to discard due to version incompatibility.  source="postgres_exporter.go:596"
DEBU[0000] flush_lag is being forced to discard due to version incompatibility.  source="postgres_exporter.go:596"
DEBU[0000] replay_lag is being forced to discard due to version incompatibility.  source="postgres_exporter.go:596"

@patsevanton
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants