Community discussions

MikroTik App
 
deanMK
newbie
Topic Author
Posts: 38
Joined: Sat Apr 12, 2014 2:46 pm
Location: Macedonia

Change interface for monitoring in vnStat Container

Sun Mar 23, 2025 3:09 pm

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
 
User avatar
antonsb
MikroTik Support
MikroTik Support
Posts: 431
Joined: Sun Jul 24, 2016 3:12 pm
Location: Riga, Latvia

Re: Change interface for monitoring in vnStat Container

Tue Mar 25, 2025 1:25 pm

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.
 
deanMK
newbie
Topic Author
Posts: 38
Joined: Sat Apr 12, 2014 2:46 pm
Location: Macedonia

Re: Change interface for monitoring in vnStat Container

Tue Mar 25, 2025 6:01 pm

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).
 
User avatar
antonsb
MikroTik Support
MikroTik Support
Posts: 431
Joined: Sun Jul 24, 2016 3:12 pm
Location: Riga, Latvia

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

Tue Mar 25, 2025 6:46 pm

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.