tomaae / homeassistant-mikrotik_router

Mikrotik router integration for Home Assistant
Apache License 2.0
292 stars 48 forks source link

[Feature] number of active connections #277

Closed SamJongenelen closed 1 year ago

SamJongenelen commented 1 year ago

Is your feature request related to a problem? Please describe.

I would like to see the number of active connections, possibly per interface.

Would that be possible?

Describe the solution you'd like

Sensors with connection count

Describe alternatives you've considered

None

Additional context

tomaae commented 1 year ago

can you give more detail? not sure what do you mean by active connections per interface.

SamJongenelen commented 1 year ago

Well, for instance, if i have say some internet facing hosts on different interfaces, is like to know the IP connections/sockets that are open. I don't have winbox near me, but i think the interface has a list op connections, id like just the count.

Reason: sometimes my network is slow bc a ver very high amount of small packets is being sent. (Think BitTorrent style). So not much down or up is consumed, not much CPU or RAM, but still my network is slow. For me to see this (eg tun0 vxxx connections, wan1: 300connections, Eth1: 1083 connections in a dashboard in HA can help me see what's going on. Maybe even the socket state (open,idle, waiting,..) would even be possible

Hope this helps make it clear.

tomaae commented 1 year ago

I dont think something like that is available on mikrotik. but if you can find it, I will look if its feasable.

SamJongenelen commented 1 year ago

The command that would be similar would be /ip/firewall/connection/print

I guess?

tomaae commented 1 year ago

using connection list is not really an option. that can be a long list which is known to cause high cpu load on mikrotik. we would need access to already computed data provided by mikrotik.

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.