Dear all,
is there a way (through script, API or whatsoever) to bulk-update device custom fields?
We have a map with thousands of devices and need to fill custom fields based on either MAC address, device name or IP address.
Any hint is highly appreciated.
Thanks,
-Chris
No. The interface has never been finished. It’s pretty poor really.
What a bummer - thanks.
Time to get an apprentice working on updating ~2000 devices with three fields each…
-Chris
Update:
A colleague of mine is currently writing a Python script that remote controls chrome that then cycles through WebFig where we have access to all relevant device fields in the dude.
Will share the outcome once we have what we need.
-Chris
good thinking. It is sad that there is no developer assigned to focus on TheDude. The idea of this system is wonderful, but lack of development unfortunately creates significant obstacles for serious use.
All that concerns mass mailing, that you must use bulk mail software. This is a very promising software, aimed at the result. Just [removed link].
I’m working on a little tool that can bulk execute any command that you would be able to execute in the CLI.
DM me if you are interested.
-Ruben
Hey Ruben,
that would be great, thank you very much.
DM is not supported here in the forum - feel free to contact me on cdiedrich (at) clairglobal.com
Thanks again,
-Chris
`
…but isn’t the exact problem being talked about here that The Dude has virtually no CLI access whatsoever? So what good would this do?
For example, try “/dude device print detail” or “/dude device set 0 ” from the CLI and see what that gets you. Literally the only information you can get or set about a device object in The Dude from the CLI is its name. Period. It’s absolutely useless. (And because ROS API mirrors the CLI in functionality, you can’t use the API to do anything practical with your Dude database, either.)
Or am I misunderstanding and you are working on a tool that would essentially implement what you should be able to do via CLI if MikroTik had actually implemented it, not what you currently can do with the CLI?
Anyway, all of this is why I started diving into the format of the Dude database itself, so that I can read stuff out of it directly. You can see the initial results of this here: http://forum.mikrotik.com/t/pulling-data-direct-from-dude-database-proof-of-concept/128177/1
Based on a feature request from a co-worker, I have since enhanced it (though haven’t yet shared a new version outside of our office) to give you the option to only generate a list of “up” devices (devices that have a monitor of type “ping” that has a status of “up” instead of “down” or “acknowledged”). This requires finding and parsing the device object, its associated service objects, and cross-referencing the deviceID and serviceID with the latest row in the ‘outages’ table for that monitor.
I am even now running these scripts directly on my main Dude server, so that I don’t have to “/dude export-db” first and copy the exported database off of the Dude server…I had to “jailbreak” RouterOS to accomplish this, and then compile/build a statically-linked PHP binary which can run directly on RouterOS. So now when I run my scripts, they are reading data directly out of the live/production Dude database in real-time.
Adding things to The Dude or changing things in it will be significantly more complex than just pulling data out, of course. You’d have to generate map objects in addition to service objects and service-to-device bindings (which are yet separate objects). At the moment I don’t have the need to do this, so I’m unlikely to pursue it. Honestly, I’d rather just see MikroTik finish building out CLI access to The Dude. It’s ridiculous that you can get or change virtually all of the information about a Dude object (other than its position on a map) in Winbox, but can’t do so from the CLI.
– Nathan