Pulling data from Unifi controller?

Last week I had to deal with a weaponized Dish Hopper box and there are some very interesting alerts (~5k of them) sitting in our Unifi Controller. Is there a simple way to pull all the data that I am just missing? I would be somewhat happy with a csv dump.

I have been searching around but have yet to find anything useful, which is kind of surprising. Which is leading me to believe that extreme lack of sleep is causing a brain fart type situation.

Any suggestions would be appreciated.

Use the syslog setting to export to a syslog server.

I think you can export it all from the database directly as well.

I did some work a couple of years ago pulling details of registered guest portal users for a giveaway being offered by a shop. Managed to get it all out of the DB but I don’t really recall much about how I did it honestly. From memory it wasn’t that hard once I worked out which tables I needed.

Appreciate the reply, will that work for data which is already recorded?

If I’m not mistaken, the controller is using MongoDB. I have zero experience with Mongo, but, I will look into it. Thank you.

It is Mongo, I had 0 exp with it either but it’s basically all the same as mySQL and SQL server so shouldn’t take much working out if you have any DB / Coding experiance.

Just had a quick google (because I was curious)

ssh in
sudo -i
mongo -port 27117
use ace
show tables

should get you somewhere close. Not sure which table the alerts are in though.

Maybe

db.event.find({})

1 Like

I just wanted to point out you can use mongo cloud services here: MongoDB Cloud | MongoDB which is free. It will take your logs and show performance visulizations. You can also use it to search and other stuff through their API.

Data Foundation
First and foremost in MongoDB Cloud is a foundation for working with data. MongoDB Atlas, Search, and Data Lake serve different workloads through a common API, while Realm Database extends the data foundation to the edge.

There is a program on github, Edda that is a log viewer to print out in human readable form. I.E contextualize. GitHub - mongodb-labs/edda: A log visualizer for MongoDB - This Repository is NOT a supported MongoDB product

I have not personally used either. YMMV