Page MenuHomeSoftware Heritage

sql exporter is failing to retrieve the number of running queries
Closed, MigratedEdits Locked

Description

The sql exporter is complaining about the query executed to get the number of queries running on the database :

Nov 30 16:56:48 belvedere.internal.softwareheritage.org prometheus-sql-exporter[3449201]: {"caller":"level.go:63","db":"postgres","err":"Column 'usename' must be type text (string)","host":":5433","job":"12/main","level":"error","msg":"Failed to update metric","query":"running_queries","ts":"2020-11-30T16:56:48.217844289Z","value":"count"}
Nov 30 16:56:48 belvedere.internal.softwareheritage.org prometheus-sql-exporter[3449201]: {"caller":"level.go:63","db":"postgres","err":"zero values found","host":":5433","job":"12/main","level":"error","msg":"Failed to update metrics","query":"running_queries","ts":"2020-11-30T16:56:48.217915131Z"}

(the same logs are also present on other database servers)

[discovered during T2828]