Community discussions

MikroTik App
 
omgwut
just joined
Topic Author
Posts: 2
Joined: Mon Feb 10, 2020 7:27 am

Get list of devices from Dude server

Mon Feb 10, 2020 8:16 am

Hello!

I'm trying to get list of devices, that added to dude, from dude server (CCR1036-12G-4S in our case) with Python script.
The values that I want to get - device name and its ip address. The proplem is that when i use command:
/dude ros address print terse
there is a lot of unsorted address for single device (tunnels, disabled, etc). But only the first address, that was added "with hands" in dude is matters in my case.

1) If i use winbox, there is a cool list, the address that added "with hands" is the first in the addresses field:
devicewinbox.PNG
2) The same good result when I use export to csv from desktop dude program, and I can parse it, and get the first addresses that we add "with hands" when adding device to dude
(example 3: 10.1.0.1, 4: 10.1.253.254):
devicecsv.PNG
3) BUT
when I use CLI command
/dude device print terse
there is just names, no addresses (unlike in winbox):
clidevice.PNG
How can I get the same list as in 1) and 2) using cli?
Plz halp, it will helps me a lot to automate all the stuff.
If its impossible, plsz let it be feature request.

P.S. Exporting db is sooooooo long, and I don't want to use it.
You do not have the required permissions to view the files attached to this post.
 
excession
Frequent Visitor
Frequent Visitor
Posts: 95
Joined: Mon May 11, 2015 8:16 pm

Re: Get list of devices from Dude server

Wed Feb 12, 2020 8:28 pm

If you only need ROS devices, you can get a lot more info out of the CLI:
/dude ros address print
It's still not exactly what you want but with some additional processing and logic it might be workable.

Or depending how your network is setup you could try de-duplicating the neighbors list:
/dude ros neighbor print
There's a few to look through within /dude ros:
address arp health interface lease neighbor queue registration-table resource route routerboard

:)
 
omgwut
just joined
Topic Author
Posts: 2
Joined: Mon Feb 10, 2020 7:27 am

Re: Get list of devices from Dude server

Wed Mar 04, 2020 2:13 pm

Just saw it, I forget to enable notifications in my account, thout it was on moderation.
If you only need ROS devices, you can get a lot more info out of the CLI:
/dude ros address print
It's still not exactly what you want but with some additional processing and logic it might be workable.
Yep, its's not what I want.
Its very strange, that this can be get with winbox and dude, but not with CLI.

Who is online

Users browsing this forum: No registered users and 19 guests