NewsBlur/archive/munin/pgbouncer_pools_cl_
2022-02-16 21:16:24 -08:00

32 lines
846 B
Python
Executable file

#!/srv/newsblur/venv/newsblur3/bin/python
# -*- coding: utf-8 -*-
from vendor.munin.pgbouncer import MuninPgBouncerPlugin
class MuninPgBouncerPoolsClientPlugin(MuninPgBouncerPlugin):
command = "SHOW POOLS"
vlabel = "Connections"
info = "Shows number of connections to pgbouncer"
fields = (
('cl_active', dict(
label = "active",
info = "Active connections to pgbouncer",
type = "GAUGE",
min = "0",
)),
('cl_waiting', dict(
label = "waiting",
info = "Waiting connections to pgbouncer",
type = "GAUGE",
min = "0",
)),
)
@property
def title(self):
return "PgBouncer client connections on %s" % self.dbwatched
if __name__ == "__main__":
MuninPgBouncerPoolsClientPlugin().run()