What did you do?
I have 1 postgres server with multiple databases for multiple services, and I run multiple metrics on all databases,
And I want to setup a custom query for specific database.
the query:
pg_open:
query: "SELECT status status,count(*) total FROM repository group by status"
metrics:
- status:
usage: "LABEL"
description: "status"
- total:
usage: "GAUGE"
description: "total"
What did you expect to see?
To not see error logs from running this query, I want this query to run on 1 database only.
What did you see instead? Under which circumstances?
Error logs:
caller=namespace.go:236 level=info err="Error running query on database \"localhost:5432\": pg_open pq: relation \"repository\" does not exist"
caller=postgres_exporter.go:682 level=error err="queryNamespaceMappings returned 1 errors"
Environment
System information:
Linux 5.15.0-79-generic x86_64
postgres_exporter version:
postgres_exporter, version 0.15.0 (branch: HEAD, revision: 68c176b8833b7580bf847cecf60f8e0ad5923f9a)
build user: root@05d0b99bd5f7
build date: 20231108-12:59:10
go version: go1.20.11
platform: linux/amd64
tags: unknown
What did you do? I have 1 postgres server with multiple databases for multiple services, and I run multiple metrics on all databases, And I want to setup a custom query for specific database.
the query:
What did you expect to see? To not see error logs from running this query, I want this query to run on 1 database only.
What did you see instead? Under which circumstances? Error logs:
Environment
Linux 5.15.0-79-generic x86_64
postgres_exporter, version 0.15.0 (branch: HEAD, revision: 68c176b8833b7580bf847cecf60f8e0ad5923f9a) build user: root@05d0b99bd5f7 build date: 20231108-12:59:10 go version: go1.20.11 platform: linux/amd64 tags: unknown
postgres:13-alpine