mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-08-21 05:45:13 +00:00
27 lines
653 B
Text
27 lines
653 B
Text
![]() |
#!/usr/bin/env python
|
||
|
# -*- coding: utf-8 -*-
|
||
|
|
||
|
from munin.pgbouncer import MuninPgBouncerPlugin
|
||
|
|
||
|
class MuninPgBouncerStatsQueryServerPlugin(MuninPgBouncerPlugin):
|
||
|
command = "SHOW STATS"
|
||
|
vlabel = "Microseconds"
|
||
|
info = "Shows average query duration in microseconds"
|
||
|
|
||
|
fields = (
|
||
|
('avg_query', dict(
|
||
|
label = "received",
|
||
|
info = "Average query duration",
|
||
|
type = "GAUGE",
|
||
|
min = "0",
|
||
|
)),
|
||
|
)
|
||
|
|
||
|
@property
|
||
|
def title(self):
|
||
|
return "PgBouncer average query duration on %s" % self.dbwatched
|
||
|
|
||
|
if __name__ == "__main__":
|
||
|
MuninPgBouncerStatsQueryServerPlugin().run()
|
||
|
|