socialwifi / RouterOS-api

Python API to RouterBoard devices produced by MikroTik.
MIT License
251 stars 100 forks source link

Monitor ethernet and get negotiated rate #83

Closed cykyy closed 2 years ago

cykyy commented 2 years ago

Hello, I am trying to get the negotiated rate of the interface. This command ("/interface ethernet monitor ether1 once") gives the exact information I need on Mikrotik CLI but it doesn't run through the API! Can anyone help me with how I can get the information?. I really appreciate any help you can provide 🙏.

cykyy commented 2 years ago

I have just fixed this, this did the trick, conn.get_binary_resource('/').call('interface/ethernet/monitor', {'numbers': 'ether1'.encode("utf-8"), 'once': 'once'.encode("utf-8")})

banderlog commented 9 months ago

@cykyy thanks, you saved me) But from where you get this necessary parameters in dict, is there some doc about it?