9
0
Fork 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
1 changed files with 1 additions and 0 deletions

View File

@ -81,6 +81,7 @@ async def scrape_mikrotik(target, port):
break
port_count += 1
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])
res = await mk.read_full_answer()