Documentation about do={<script>} in monitoring commands

There are a number of commands, such as

/interface monitor-traffic
/interface <whatever-tunnel> monitor 
/system resource monitor
...

That take a do={} attribute that will get executed in every iteration of the monitoring…

The things one can do inside the “do” block don’t look very useful unless the object of the monitoring is passed to the block…

I wonder if there is some documentation on how to achieve it. I have tried google, but “do” si too common a keyword to search by it…

Thanks in advance

/interface ethernet monitor ether1 do={ ... $name ... $status ... $"link-partner-advertising" .... }

/interface monitor ether1 do={ ... $name ... $"tx-bits-per-second" ... $"rx-bits-per-second" .... }

for example, $“” on link-partner-advertising because “-” are present

Regarding documentation, wiki has several examples, for example:
https://wiki.mikrotik.com/wiki/Manual:Scripting-examples#Check_bandwidth_and_add_limitations

DOH! Now that you posted the example I see that

  • If there are several items monitored, the script is called once per item (I thought it was once per iteration)
  • $ completes the available variables, which are the attributes that would be returned by the command

Sorry for not having tried $