forked from samuel/python-munin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathriak_ops
More file actions
executable file
·34 lines (30 loc) · 773 Bytes
/
riak_ops
File metadata and controls
executable file
·34 lines (30 loc) · 773 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from 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()