Skip to content

Commit 56fa7ac

Browse files
authored
chore: add metric for pending WAL files to be archived (#970)
1 parent 014029a commit 56fa7ac

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

docker/all-in-one/opt/postgres_exporter/queries.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,15 @@ pg_stat_statements:
170170
usage: "COUNTER"
171171
description: "Total time spent, in seconds"
172172

173+
pg_ls_archive_statusdir:
174+
master: true
175+
cache_seconds: 60
176+
query: "select count(*) as wal_pending_count from pg_ls_archive_statusdir() where name like '%.ready'"
177+
metrics:
178+
- wal_pending_count:
179+
usage: "COUNTER"
180+
description: "Number of not yet archived WAL files"
181+
173182
auth_users:
174183
master: true
175184
cache_seconds: 60

0 commit comments

Comments
 (0)