Recomended Grafana dashboard https://grafana.com/grafana/dashboards/16601
Counts rx, tx and total transferred bytes on network interfaces. Stores results in interface's comment and pushes them to InfluxDB.
You can use WebFig, Winbox or other way to modify the comment. We use CLI:
/interface ethernet set ether1 comment="{traffic:null}"
/interface wireless set wlan2 comment="{traffic:null}"
:global influxDBURL "http://influx.db.server:8086/api/v2/write?org=ORAGNIZATION&bucket=BUCKET&precision=ns"
/tool fetch url="$influxDBURL" http-header-field="Authorization: TOKEN YOUR-TOKEN,Content-Type: text/plain; charset=utf-8,Content-Type: text/plain; charset=utf-8" keep-result=no http-method=post http-data="$postRequestPayload"
/system scheduler add interval=2s name=interface_traffic_usage on-event="/system/script/run script1" policy=read,write,test start-time=startup
Check the scheduler:
:put [ /system scheduler get interface_traffic_usage next-run ]
:put [ /system scheduler get interface_traffic_usage run-count ]
Check the interface comment:
:put [/interface ethernet get ether1 comment ]
:put [/interface ethernet get wlan2 comment ]
Installation is similar. Loose these comment modification steps and you're all set.