Community discussions

MikroTik App
 
User avatar
EIKA
just joined
Topic Author
Posts: 13
Joined: Thu Dec 28, 2017 7:29 pm
Location: Moscow, Russia

Need syntax help (interface --> interface list)

Sun Jun 28, 2020 2:05 pm

Hi all!

This is what I have had and it worked fine:
\n:global txbyte [/interface get [find name=LTE1] tx-byte];\r\

And this is what I trying to do, and it doesn't work:
\n:global txbyte [/interface/list get [find name=Double-WAN-List] tx-byte];\r\

I included LTE1 interface in Double-WAN-List and wanted to get TX byte data for all of interfaces included there. Bad sadly syntax for interface list is incorrect. Because I don't know what is the right syntax - I just tried a few options with trial and error method. And I was not lucky.

Please advise.
 
User avatar
Jotne
Forum Guru
Forum Guru
Posts: 1743
Joined: Sat Dec 24, 2016 11:17 am
Location: jo.overland at gmail.com

Re: Need syntax help (interface --> interface list)

Sun Jun 28, 2020 5:26 pm

Cut and past this to terminal. Do you get any output.
:put [/interface find name=Double-WAN-List]
If this is ok, try:
:put [/interface/list get [find name=Double-WAN-List]
Post output of
/interface print detail
Edit:

It may be the hyphen - giving problems. Try to rename interface to DoubleWANList
 
How to use Splunk to monitor your MikroTik Router(s)

MikroTik->Splunk
 
 
User avatar
EIKA
just joined
Topic Author
Posts: 13
Joined: Thu Dec 28, 2017 7:29 pm
Location: Moscow, Russia

Re: Need syntax help (interface --> interface list)

Sun Jun 28, 2020 5:44 pm

Thanks, but your advice doesn't help. When I copy/paste your command to terminal, it returns nothing. If I change name to physical interface, it returns number with asterisk (like *8). I think that problem is in we search through interfaces, but must search through interface lists. This is 2 different beasts.

Dash is absolutely OK for MikroTik and widely used everywhere in console commands.
 
User avatar
Jotne
Forum Guru
Forum Guru
Posts: 1743
Joined: Sat Dec 24, 2016 11:17 am
Location: jo.overland at gmail.com

Re: Need syntax help (interface --> interface list)

Sun Jun 28, 2020 8:00 pm

There is an error.
wrong:
:put [/interface/list get [find name=Double-WAN-List]
correct
:put [/interface get [find name="Double-WAN-List]" ] tx-byte]
No list and double quote.
 
How to use Splunk to monitor your MikroTik Router(s)

MikroTik->Splunk
 
 
User avatar
EIKA
just joined
Topic Author
Posts: 13
Joined: Thu Dec 28, 2017 7:29 pm
Location: Moscow, Russia

Re: Need syntax help (interface --> interface list)

Mon Jun 29, 2020 12:11 am

Thank you very much!

Who is online

Users browsing this forum: lmcarriles and 22 guests