need some help in this , i am trying to monitor interface usage by sending a sms like below
interface monitor-traffic [/interface find name=ether1] once do={
:local tx (tx-bits-per-second / 1024);
:local rx (rx-bits-per-second / 1024);
:put $tx;
:put $rx;
/tool sms send usb2 phone-number=989xxxx message="tx = $tx rx = $rx" channel=1
}
this part is working fine but i want to pass a variable to the script to define interface like
interface monitor-traffic [/interface find name=$var] once do={
:local tx (tx-bits-per-second / 1024);
:local rx (rx-bits-per-second / 1024);
:put $tx;
:put $rx;
/tool sms send usb2 phone-number=989xxxx message="tx = $tx rx = $rx" channel=1
}
the sms format which i am sending is
:cmd password script scriptname var=ether1
pls point me in the right direction