Skip to content

Commit 1b638e4

Browse files
authored
Add Max frozen xid age to returned values
1 parent 939400a commit 1b638e4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

main.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@ type MetricMap struct {
8888

8989
// Metric descriptors for dynamically created metrics.
9090
var metricMaps = map[NamespaceAndQuery]map[string]ColumnMapping{
91+
{"pg_database", "select datname,age(datfrozenxid) as xid_age from pg_database"}: map[string]ColumnMapping{
92+
"datname": {LABEL, "OID of a database", nil},
93+
"xid_age": {COUNTER, "Age of maximum frozen xid", nil},
94+
},
9195
{"pg_stat_bgwriter", "select * from pg_stat_bgwriter"}: map[string]ColumnMapping{
9296
"checkpoints_timed": {COUNTER, "Number of scheduled checkpoints that have been performed", nil},
9397
"checkpoints_req": {COUNTER, "Number of requested checkpoints that have been performed", nil},

0 commit comments

Comments
 (0)