mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-08-05 16:58:59 +00:00
35 lines
780 B
Text
35 lines
780 B
Text
![]() |
#!/usr/bin/env python
|
||
|
# -*- coding: utf-8 -*-
|
||
|
|
||
|
from vendor.munin.riak import MuninRiakPlugin
|
||
|
|
||
|
class RiakOpsPlugin(MuninRiakPlugin):
|
||
|
args = "-l 0 --base 1000"
|
||
|
vlabel = "ops/sec"
|
||
|
title = "Riak operations"
|
||
|
info = "Operations"
|
||
|
fields = (
|
||
|
('gets', dict(
|
||
|
label = "gets",
|
||
|
info = "gets",
|
||
|
type = "DERIVE",
|
||
|
min = "0",
|
||
|
)),
|
||
|
('puts', dict(
|
||
|
label = "puts",
|
||
|
info = "puts",
|
||
|
type = "DERIVE",
|
||
|
min = "0",
|
||
|
)),
|
||
|
)
|
||
|
|
||
|
def execute(self):
|
||
|
status = self.get_status()
|
||
|
return dict(
|
||
|
gets = status['node_gets_total'],
|
||
|
puts = status['node_puts_total'],
|
||
|
)
|
||
|
|
||
|
if __name__ == "__main__":
|
||
|
RiakOpsPlugin().run()
|