Page 1 of 1

Change interface for monitoring in vnStat Container

Posted: Sun Mar 23, 2025 3:09 pm
by deanMK
Hi Mikrotik Members

Because RouterOS dont have native function for monitoring WEB usage traffic itself, i was put vnStat as container on my hAP AX3. Container works as should, but i have one dilemma. When i load IP where container is running, i got that vnStat is monitoring eth0 as interface i suppose. Interfaces in RouterOS are not monitored like that so im unsure what passed traffic monitor vnStat? Is monitor entire traffic that passed into interefaces (something that i dont need it), or monitor WAN interface, in my case ether1. How to configure it, if not properly monitor to monitor just ether1 passed traffic? Also found this but without answer. Thanks in advance

Image

EDIT: In fact it not monitor ether1 from Mikrotik at all. This is last stats from last 15 mins. Makes no sense this data.

Image

Re: Change interface for monitoring in vnStat Container

Posted: Tue Mar 25, 2025 1:25 pm
by antonsb
you are monitoring only virtual veth interface container is siting on.
from vnstat dockerhub page:
--network=host is necessary for accessing the network interfaces of the Docker host instead of being limited to monitoring the container specific interface
this is currently unsupported in MikroTik containers.

Re: Change interface for monitoring in vnStat Container

Posted: Tue Mar 25, 2025 6:01 pm
by deanMK
you are monitoring only virtual veth interface container is siting on.
from vnstat dockerhub page:
--network=host is necessary for accessing the network interfaces of the Docker host instead of being limited to monitoring the container specific interface
this is currently unsupported in MikroTik containers.
So basically you want to tell me that containers currently not supporting monitoring network host different then container IP Pool ? Can i set as Container into Proxmox and monitor from there? Both (container and host will be the same).

Re: Change interface for monitoring in vnStat Container  Topic is solved

Posted: Tue Mar 25, 2025 6:46 pm
by antonsb
i haven't used VNstat, just citing dockerhub page -
vnStat is a network traffic monitor that uses the network interface statistics provided by the kernel as information source.
so it looks to me that it monitors local network devices. Container runs on RouterOS kernel, BUT only veth interface container is created with is exposed to it as --network=host flag is not available in MikroTik container. It can't monitor any device other than virtual interface it is "sitting" on.