How to get nodes/switches closest to the end customer

Hi! I’m not used to Libre, but I’m trying to get information about the nodes/switches closest to the end customer when a critical alarm is triggered.

I’m playing around a bit with the API but can’t find any obvious way to do it, is there any? If not via the API, can I do it via alert message in some way?

I’ve created this image so you might understand what I’m trying to accomplish.
Third goes down, and I want to know the outer most nodes/switches that are affected.

Thanks in advance for any help or comment.

You could maybe do this via the dependencies feature if you set up the relationships. There is no direct query API call for it, but you can get the information from the devices endpoint, it returns “dependency_parent_id” and “dependency_parent_hostname”.

You’d have to build the dependency map to get your answer though, so a dedicated API end-point would probably be something useful.

The info is in the device_relationships table, and you could recursively walk from a parent down to the end nodes with some work.

The calls which generate the Device Dependencies graphical map are in app/Http/Controllers/Maps/DeviceDependencyController.php which can probably be leveraged, but I can’t make sense of the database abstraction to comment any further.

Thanks for the reply!

I suspected there would be no easy take on this.

I’ll checkout the things you mentioned and see if I can figure it out

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