2020-12-03 14:05:32 -05:00
|
|
|
#!/srv/newsblur/venv/newsblur3/bin/python
|
2011-12-02 16:22:38 -08:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
2016-11-11 11:06:33 -08:00
|
|
|
from vendor.munin.pgbouncer import MuninPgBouncerPlugin
|
2011-12-02 16:22:38 -08:00
|
|
|
|
|
|
|
class MuninPgBouncerStatsBytesServerPlugin(MuninPgBouncerPlugin):
|
|
|
|
command = "SHOW STATS"
|
|
|
|
vlabel = "Bytes"
|
|
|
|
info = "Shows average bytes per second"
|
|
|
|
|
|
|
|
fields = (
|
|
|
|
('avg_recv', dict(
|
|
|
|
label = "received",
|
|
|
|
info = "Average bytes received per second",
|
|
|
|
type = "GAUGE",
|
|
|
|
min = "0",
|
|
|
|
)),
|
|
|
|
('avg_sent', dict(
|
|
|
|
label = "sent",
|
|
|
|
info = "Average bytes sent per second",
|
|
|
|
type = "GAUGE",
|
|
|
|
min = "0",
|
|
|
|
)),
|
|
|
|
)
|
|
|
|
|
|
|
|
@property
|
|
|
|
def title(self):
|
|
|
|
return "PgBouncer bytes per second on %s" % self.dbwatched
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
MuninPgBouncerStatsBytesServerPlugin().run()
|
|
|
|
|