mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-08-05 16:58:59 +00:00
24 lines
509 B
Text
24 lines
509 B
Text
![]() |
#!/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()
|