Community discussions

MikroTik App
 
silderan
newbie
Topic Author
Posts: 35
Joined: Mon Sep 21, 2015 12:21 pm

API. Listening interfaces and bridges doesn't report deletions

Sun Jan 06, 2019 1:11 pm

Hello.

As subject says, using the commands:
/interface/listen ?dynamic=true?#|
/interface/bridge/listen ?#|
never receive a reply when I delete any dynamic interface (actually, PPPoE clients) or delete bridges.
But, I receive replies when new dynamic interfaces are created or new bridges are created or modified.

It's just an example; I can receive pppoe clients disconnections in /ppp/active/ path. But, what about bridge?

On the other side, users (by /user/listen command), addresses (/ip/address/listen) and prots (/interface/bridge/port/listen) reports everything just fine.

Must I listen bridge in other path?
 
User avatar
boen_robot
Forum Guru
Forum Guru
Posts: 2400
Joined: Thu Aug 31, 2006 4:43 pm
Location: europe://Bulgaria/Plovdiv

Re: API. Listening interfaces and bridges doesn't report deletions

Mon Jan 07, 2019 4:17 pm

Try to use
/interface/print
=follow=
?dynamic=true
?#|
instead.

Print with "follow" behaves pretty much the same as "listen", as "print" is supposedly the only command that can accept queries.
 
silderan
newbie
Topic Author
Posts: 35
Joined: Mon Sep 21, 2015 12:21 pm

Re: API. Listening interfaces and bridges doesn't report deletions

Mon Jan 07, 2019 6:08 pm

Thank you for your interest.

I did some tests and found this "tips".
  • There are bridge, vlans, etc .dead replies while listening to /interface/. Deeper than this path (like /interface/bridge or /interface/vlan) don't reply.
  • There is not .dead replies from dynamic interfaces while listening to /interface/ Must listen on their specific path (/ppp/active, for example)
  • Using listen or print =follow= behaves identical regarding .dead replies.
  • Queries with listen, actually works!! Is it a new non-notified API feature? (Because in documentation especifically says what you said: queries only works with print/getall command)
  • "OR" and "AND" Query calculation where there is only one query word, doesn't works. It makes sence, because it's intended for 2 values.
Not sure if I'm correct or wrong.
 
User avatar
boen_robot
Forum Guru
Forum Guru
Posts: 2400
Joined: Thu Aug 31, 2006 4:43 pm
Location: europe://Bulgaria/Plovdiv

Re: API. Listening interfaces and bridges doesn't report deletions

Thu Jan 10, 2019 12:03 pm

Yeah, I've also noticed that "/listen" is effectively an alias for "/print" with "follow-only" argument.

The .dead replies not being consistent across menus is probably a RouterOS bug.

Who is online

Users browsing this forum: almdandi, Mosfet and 54 guests