10
0

Add port count metric

This commit is contained in:
Lauri Võsandi 2021-10-16 08:49:13 +03:00
parent deb11aa409
commit d7fb9c391d

View File

@ -81,6 +81,7 @@ async def scrape_mikrotik(target, port):
break break
port_count += 1 port_count += 1
ports = ",".join([str(j) for j in range(0, port_count)]) ports = ",".join([str(j) for j in range(0, port_count)])
yield "port_count", "gauge", port_count, {"host": target }
mk.talk_sentence(["/interface/ethernet/monitor", "=once=", "=numbers=%s" % ports]) mk.talk_sentence(["/interface/ethernet/monitor", "=once=", "=numbers=%s" % ports])
res = await mk.read_full_answer() res = await mk.read_full_answer()