Closed
Description
I followed the supplied commands to make
the project . While connecting to my local Postgres Db,
I am getting :
export DATA_SOURCE_NAME="postgresql://postgres:postgres@localhost:5432/postgres?sslmode=disable"
# ./postgres_exporter
INFO[0000] Established new database connection. source=postgres_exporter.go:951
INFO[0000] Semantic Version Changed: 0.0.0 -> 9.4.1 source=postgres_exporter.go:904
panic: inconsistent label cardinality
goroutine 17 [running]:
postgres_exporter-master/vendor/github.com/prometheus/client_golang/prometheus.MustNewConstMetric(0xc42021c770, 0x3, 0x0, 0xc42025b120, 0x2, 0x2, 0x0, 0x0)
/usr/local/go/src/postgres_exporter-master/vendor/github.com/prometheus/client_golang/prometheus/value.go:172 +0xb3
main.queryNamespaceMapping(0xc420184000, 0xc42014e280, 0x7c9e3f, 0x10, 0xc420129180, 0x2, 0x2, 0xc420139500, 0xc420139b90, 0x0, ...)
/usr/local/go/src/postgres_exporter-master/postgres_exporter.go:853 +0x1200
main.queryNamespaceMappings(0xc420184000, 0xc42014e280, 0xc4201391a0, 0xc420139b90, 0x0)
/usr/local/go/src/postgres_exporter-master/postgres_exporter.go:868 +0x321
main.(*Exporter).scrape(0xc420182000, 0xc420184000)
/usr/local/go/src/postgres_exporter-master/postgres_exporter.go:996 +0x58d
main.(*Exporter).Collect(0xc420182000, 0xc420184000)
/usr/local/go/src/postgres_exporter-master/postgres_exporter.go:747 +0x39
main.(*Exporter).Describe(0xc420182000, 0xc420144120)
/usr/local/go/src/postgres_exporter-master/postgres_exporter.go:740 +0xb0
postgres_exporter-master/vendor/github.com/prometheus/client_golang/prometheus.(*registry).Register.func1(0x97ab20, 0xc420182000, 0xc420144120)
/usr/local/go/src/postgres_exporter-master/vendor/github.com/prometheus/client_golang/prometheus/registry.go:218 +0x3b
created by postgres_exporter-master/vendor/github.com/prometheus/client_golang/prometheus.(*registry).Register
/usr/local/go/src/postgres_exporter-master/vendor/github.com/prometheus/client_golang/prometheus/registry.go:217 +0xbc
I am unsure about why the panic: inconsistent label cardinality
error occurs.