Thursday, November 14, 2019

Physical switchboard with LibreNMS API integration

Hello r/networking,

For a few weeks now I have been working on and off on a project, given to me by u/sysvival (you may now him as the Wifi Banana Guy).

The goal of the project was to make a physical switchboard to display the status of the networking devices by turning LEDs on or off.

  • Green LED: Everything is in working order.
  • Yellow LED: A device has restarted within 24 hours.
  • Red LED: An interface has changed status from up to down.

To do this I wrote a script in python (my first ever Python script) to run off a Raspberry Pi. The script requests a list of all devices in the network from the LibreNMS API, and then sorts them by name.

After sorting the devices checks are made to determine if any light other than the green should be on.

GIFs and pictures of the switchboard

(The APC device is just a random device we had laying around that I used for testing purposes.)

Pastebin link to the code

I would love to hear your feedback.

Cheers!



No comments:

Post a Comment