Mikrotik Bandwidth Monitor
Mikrotik Bandwidth Monitor
Mikrotik Bandwidth Monitor
<<< Phân quyền truy cập cho file database mikstats.db >>>
/system scheduler
add interval=30m name=MonitorBandwidth on-event=":local sysnumber [/system rou\
terboard get value-name=serial-number]\r\
\n:local txbytes [/ip firewall mangle { get [find comment=wan-tx] bytes }]\
\r\
\n:local rxbytes [/ip firewall mangle { get [find comment=wan-rx] bytes }]\
\r\
\n/tool fetch url=(\"http://192.168.103.246/mikmonitor/collector.php\\\?sn\
=\$sysnumber&tx=\$txbytes&rx=\$rxbytes\") mode=http keep-result=no\r\
\n/ip firewall mangle reset-counters [/ip firewall mangle find comment=wan\
-tx]\r\
\n/ip firewall mangle reset-counters [/ip firewall mangle find comment=wan\
-rx]\r\
\n:log info (\"WAN traffic counters have been reset!\")" policy=read,test
# id------devicename
# 1------VNPT-01 -------- comment: vnpt1-down/up
# 2------VNPT-02 -------- comment: vnpt2-down/up
# 3------VLAN-103 -------- comment: vlan103-down/up
# 4------VLAN-105 -------- comment: vlan105-down/up
# 5------DESK-01 -------- comment: desk-01-down/up
# 6------VLAN-099 --------- comment: vlan099-down/up