Hi to all Dude masters.. I am trying to print frequency of specific link (Appereance Label menu) with concatenating OID and [Interface.Index] value:
[oid(concatenate(“1.3.6.1.4.1.14988.1.1.1.1.1.7.”,“[Interface.Index]”))]
I’ve tried many combinations from manual at http://wiki.mikrotik.com/wiki/Manual:Scripting and other forum posts but I am getting only text output like this:
[oid(concatenate(“1.3.6.1.4.1.14988.1.1.1.1.1.7.”,“4”))]
([Interface.Index] is replaced with right iface number and nothing else)
What is wrong? 
What is wrong? > 
The Dude does not know IP addres of device you are trying to get oid, because you are working with link(in a link context), not with device.
You must provide device IP to function “oid”
Your function should look like
oid(concatenate(“1.3.6.1.4.1.14988.1.1.1.1.1.7.”,“[Interface.Index]”),“5”,“300”,“DEV.IP.ADD.RES”,“Community_Group”)
for more info you look at oid function description.
This command:
[oid(concatenate(“1.3.6.1.4.1.14988.1.1.1.1.1.7.”,“4”))]
works fine..
And [Interface.Index] alone returns correct value (4)..
I have problem with using OID and variable together..
Btw
[oid(concatenate(“1.3.6.1.4.1.14988.1.1.1.1.1.7.”,“[Interface.Index]”),“5”,“300”,“10.38.0.43”,“public”)]
doesn’t work either (same textual output)..
I was breaking my head over this one, too…
Anyone can confirm this is not possible? According to me there are too many [[]] in the function…confusing functions/variables
Edit: Dude 4 beta has a new function “link_index” which works!
I did: [oid(concatenate(“1.3.6.1.4.1.9.2.2.1.1.28.”,link_index()))] and it returned my interface description.
try that?
Andreas
TNX, blackpaw
Now we can easy determine the direction of traffic flow.

The code for link apeareance is
Gi 1/0/21 -- Gi 1/0/2
Rx: [Interface.InBitRate]
Tx: [Interface.OutBitRate]
RxPPS:[Interface.InUnicastPacketsRate]
TxPPS:[Interface.OutUnicastPacketsRate]
Stats on: [oid(concatenate("1.3.6.1.2.1.2.2.1.2.",link_index()))]
I can see the link monitored and I know traffic direction(rx and tx may differ). In the sample traffic is measured from switch Gi1/0/23, not from main router Gi1/0/2.