9
0
Fork 0

More ROS 7.x fixes
continuous-integration/drone Build is passing Details

This commit is contained in:
Lauri Võsandi 2022-08-17 20:43:05 +03:00
parent 427d88f842
commit 22e623a992
1 changed files with 3 additions and 1 deletions

View File

@ -42,7 +42,7 @@ async def wrap(i):
async def scrape_mikrotik(mk):
async for obj in mk.query("/interface/print"):
labels = {"port": obj["name"], "type": obj["type"]}
labels = {"port": obj["name"], "type": obj.get("type", "null")}
yield "interface_rx_bytes", "counter", obj["rx-byte"], labels
yield "interface_tx_bytes", "counter", obj["tx-byte"], labels
yield "interface_rx_packets", "counter", obj["rx-packet"], labels
@ -162,6 +162,8 @@ async def scrape_mikrotik(mk):
elif key == "state" or key == "state-after-reboot":
# Seems disabled on x86
pass
elif key == "poe-out-consumption":
pass
else:
raise NotImplementedError("Don't know how to handle system health record %s" % repr(key))