Community discussions

MikroTik App
 
angelo18
just joined
Topic Author
Posts: 12
Joined: Fri May 11, 2012 11:55 am

Script - search queues

Fri Oct 10, 2014 12:26 pm

Hello

How to write a script to pick out queue 2M / 2M and the ip address of the queue added to the address list?
/queue simple find where max-limit="2M/2M"
 
angelo18
just joined
Topic Author
Posts: 12
Joined: Fri May 11, 2012 11:55 am

Re: Script - search queues

Fri Oct 10, 2014 2:07 pm

I did something like that but nothing looks even if they are the queue:
/ ip firewall address-list add address = [get [/ queue simple find target where [/ queue simple find max-limit = "2M/2M"]]]
 
User avatar
c0d3rSh3ll
Long time Member
Long time Member
Posts: 558
Joined: Mon Jul 25, 2011 9:42 pm
Location: [admin@Chile] >

Re: Script - search queues

Fri Oct 10, 2014 9:14 pm

try this:

ros code

/queue simple 
:foreach i in=[ find ] do={
	:local max [ get value-name=max-limit $i]
		:local ip [ get value-name=target $i]
:if ($max = "2M/2M") do={
		/ip firewall address-list add list=queue address=$ip
} 
	}
nothing
 
dalci
just joined
Posts: 1
Joined: Mon Jun 27, 2016 8:06 pm

Re: Script - search queues

Mon Jun 27, 2016 8:12 pm

I would like augo , I want to discover and capture the ips only the max -limit queues in 1024k / 5548k and add in addrees -list . It's possible?
 
n21roadie
Forum Guru
Forum Guru
Posts: 1896
Joined: Fri Aug 07, 2009 10:36 pm
Location: Limerick,Ireland

Re: Script - search queues

Fri Jul 01, 2016 11:01 pm

try this:

ros code

/queue simple 
:foreach i in=[ find ] do={
 :local max [ get value-name=max-limit $i]
 :local ip [ get value-name=target $i]
:if ($max = "2M/2M") do={
 /ip firewall address-list add list=queue address=$ip
} 
 }
I would like to perform a similar action 
(1) detect queue of "2M/2M"
(2) find queue "Name"  and then
(3) in PPP "Active Connections" disconnect this client PPPoE session 
Any advice on how to achieve this most welcome 
N21roadie,
Network 100% MT for Now?

Who is online

Users browsing this forum: No registered users and 16 guests