Send interface Rx as parameter

Hi,

I need to send as parameter the Rx value of some specific interface. I found different post asking similar needs like http://forum.mikrotik.com/t/how-to-get-an-interfaces-current-rx-speed-in-script/56270/1 but mine is not working :frowning:

This is what I’m trying:
/interface monitor-traffic [/interface find name=ether1] once do={
/tool fetch keep-result=no url=(“http://www.domain.com/rxValue.aspx?rx=”.[received-bits-per-second]);
}

What is wrong there??

Thanks!!

The properties are available as variables, not as commands. Plus, the “?” needs to be escaped, so:

/interface monitor-traffic [/interface find name=ether1] once do={
    /tool fetch keep-result=no url=("http://www.domain.com/rxValue.aspx\?rx=" . $"received-bits-per-second");
}

Hi,

Thanks for your help but is not working :frowning:
$“received-bits-per-second” is coming empty in all the requests (and it has traffic), I think the variable is not taking the value of the properties, any idea?

Opps, the variable name is $“rx-bits-per-second”:

/interface monitor-traffic [/interface find name=ether1] once do={
    /tool fetch keep-result=no url=("http://www.domain.com/rxValue.aspx\?rx=" . $"rx-bits-per-second");
}

In general, when writing from terminal, you can find all variables in your current context by typing “$”, and then press the Tab key (and therefore, when doing that inside the “do” script, you see the injected variables).

Yes, that was the problem, is working now!
Thanks!! :smiley: