mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-08-05 16:58:59 +00:00
33 lines
826 B
Text
33 lines
826 B
Text
![]() |
#!/usr/bin/env 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()
|
||
|
|