NewsBlur/vendor/python-munin/plugins/pgbouncer_pools_cl_
2016-11-11 11:06:33 -08:00

32 lines
826 B
Python
Executable file

#!/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()