FDB table search via API (MAC/IP -> switch/port)

It would be great to have API endpoint available that would take MAC/IP and return switch/port information where device is connected to, based on the data in FDB table.

Additionally, option to query for MAC and to get corresponding IP address in return (and vice versa) would be very useful too.

It can all be done from the GUI at the moment, but having API for this would allow to integrate the feature very easily into scripts and automation workflows.

5 Likes

At the moment the only similar endpoint is api/0/ressources/ip/arp which allows to find monitored devices based on their IP or mac address.

I second the need to add a new ressource endpoint to allow searching through the fdb tables to find mac adresses location informations.

Thanks!

2 Likes

I would also like to search the fdb table via api.
@laf any Plans to implement a fdb api route ?

Any update on this? I really like to search the fdb via api.
The arp-table-search via the api doesn’t give any results when equipment is connected to Juniper switches.

Thanks!

1 Like

I would be very interested in this as well. I use Icinga as our monitoring tool and this feature could help me build the parent/child dependencies / relationships.

It is not as elegant, but you can get this data by querying librenms mysql database - this is what we do now.

+1 from me.

I created PR #10020 for FDB API calls, please test
https://github.com/librenms/librenms/pull/10020

2 Likes

Thanks @zombah.

This has now been merged in.

1 Like

Nice! Good job!
Can you add the ip and lastseen in an array ?
That would be awesome!