mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-08-05 16:58:59 +00:00
23 lines
509 B
Python
Executable file
23 lines
509 B
Python
Executable file
#!/usr/bin/env python
|
|
|
|
from vendor.munin.ddwrt import DDWrtPlugin
|
|
|
|
class DDWrtWirelessRate(DDWrtPlugin):
|
|
title = "Wireless rate"
|
|
args = "--base 1000 -l 0"
|
|
vlabel = "Mbps"
|
|
info = "rate"
|
|
fields = (
|
|
('rate', dict(
|
|
label = "rate",
|
|
info = "rate",
|
|
type = "GAUGE",
|
|
)),
|
|
)
|
|
|
|
def execute(self):
|
|
info = self.get_info()
|
|
return dict(rate=info['wl_rate'].split(' ')[0])
|
|
|
|
if __name__ == "__main__":
|
|
DDWrtWirelessRate().run()
|