Unique IDs for queues

Hi,

I am working on a web-based application that collects simple queues from multiple Mikrotik devices and stores them to a database. The accumulated traffic is displayed in a web-view.

https://github.com/manuzoli/mikrostats

My question: I would like to keep the data for one queue in one dataset even if the name changes. It is my understanding that the .id attribute in the api changes when queues are moved to another position. So its not really unique and somewhat unreliable. Does anyone know if there is any really unique identifier I can use?

You could set a comment with a unique value and use that

Thx. That could be a good workaround, though its not as ‚clean‘ as it could be.

I am now thinking of adding a unique pattern to the end of the name - smthg like #mikrostats#267#.
That could be quite well regexed and wouldn‘t rob the user from the possibility to use names and comments. I‘d like to make my tool work for as many ppl as possible.

I understand that it is more like a workaround… I have seen this technique (and soon plan to use it myself) in some other
scripting. E.g. you want to enable/disable some routes in certain cases (e.g. some failure that has been detected), then the
relevant routes all get a certain comment and they are handled with [find comment=“xxxxx”] or with the ~ match.
The default config uses this too, with the defconf comment. When the default config is reverted it uses constructs like:
/ip firewall filter remove [find comment~“defconf”]

It could be useful when there was an extra field for every configuration item, like “uuid” or something, that is generated when
the item is created and kept and can be queried, but as of now this is not available.

yeah thx for the input - i am probably going to use this workaround.

i have got another guy administrating the network and he doesn’t like changes very much. So a field thats “under the radar” of winbox would help a lot :slight_smile: