Commit 10b1ffb
authored
fix(collector): restore reserve_pool metric on PgBouncer >= 1.24 (#271)
PgBouncer 1.24.0 renamed the `reserve_pool` column in `SHOW DATABASES`
to `reserve_pool_size` (pgbouncer/pgbouncer#1232). The
exporter only mapped the old column name, so the
`pgbouncer_databases_reserve_pool` metric silently stopped being emitted
on PgBouncer 1.24+.
Add a mapping for `reserve_pool_size` next to the existing `reserve_pool`
entry, both pointing at the same metric name. The exporter iterates over
the actual columns returned by pgbouncer, and the two names are mutually
exclusive across versions, so the metric continues to be emitted exactly
once per database row regardless of pgbouncer version. Add tests covering
both column names.
Refs: #220
Signed-off-by: Dmitrij Shishkin <greeddj@gmail.com>1 parent 863a6e6 commit 10b1ffb
2 files changed
Lines changed: 25 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
235 | 235 | | |
236 | 236 | | |
237 | 237 | | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
238 | 262 | | |
239 | 263 | | |
240 | 264 | | |
| |||
0 commit comments