Can I export to CSV the devices we have in LibreNMS?


Can I export a device list to csv of what we have in LibreNMS?


Hello, I’ve just done that today.
I didn’t found tools on librenms so I’ve done this from mysql.
I’m a begginer in database but the result was not that bad.
I wanted to have IP address, model, serial number and location.

sudo mysql
use librenms
select d.hostname, d.hardware, d.serial, d.location_id as device, l.location, as location from devices d inner join locations l on = d.location_id ;

Then you copy paste on a notepad, you replace | with ,
And in excel you can import CSV.


Thanks you!

I’ve also been given this that works too:

  1. run this → php artisan tinker

Then paste

file_put_contents('devices_export.csv', Device::all()->map(fn($device) => implode(',', $device->toArray()))->implode(PHP_EOL));


1 Like

How about use the api and parse the json?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.