kutuz
1
Hi all!
RouterOS 3.16
I need to get a number of packets from a filter rule of a firewall.
When I try this from a terminal - it works, when from a script - it doesn’t.
:log info ([/ip firewall filter get 0 packets])
Can somebody tell me why?
Thanks.
fosben
2
I think it needs a print command first…
:log info works from a script, its your get 0 command that fails
kutuz
3
I know that :log info works good from a script; anyway the script I wrote in my previous post also works good from a terminal, but not from a script.
mrz
4
just as fosben said.
get does not work inside scripts.
Use
something like this:
:log info ([/ip firewall filter get [ find comment=“lala”] packets])