2016-11-11 11:09:13 -08:00
|
|
|
#!/srv/newsblur/venv/newsblur/bin/python
|
2011-12-02 16:22:38 -08:00
|
|
|
|
|
|
|
import os
|
2016-11-11 11:06:33 -08:00
|
|
|
from vendor.munin.cassandra import MuninCassandraPlugin
|
2011-12-02 16:22:38 -08:00
|
|
|
|
|
|
|
class CassandraLoadPlugin(MuninCassandraPlugin):
|
|
|
|
title = "load (data stored in node)"
|
|
|
|
args = "--base 1024 -l 0"
|
|
|
|
vlabel = "bytes"
|
|
|
|
fields = [
|
|
|
|
('load', dict(
|
|
|
|
label = "load",
|
|
|
|
info = "data stored in node",
|
|
|
|
type = "GAUGE",
|
|
|
|
min = "0",
|
|
|
|
)),
|
|
|
|
]
|
|
|
|
|
|
|
|
def execute(self):
|
|
|
|
info = self.cinfo()
|
|
|
|
return dict(load = info['Load'])
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
CassandraLoadPlugin().run()
|