mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-04-13 09:42:01 +00:00
32 lines
846 B
Python
Executable file
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()
|
|
|