I am one of the co-founders of a peering fabric (Internet eXchange) in the San Francisco CA area. We wanted a way to pull daily and weekly graphs out of LibreNMS to display on our web site. I first ran rrdtool to create this on the LibreNMS box and then transferred these to the web site but found that a bit cumbersome. In drilling into the LibreNMS, I found I could get nearly everything I wanted via the API. Of course some of this is not documented so I had to dig through the code to find what I wanted.
One thing that was handy here was leveraging Libre’s concept of groups here to use this to identify ports I wanted to aggregate up. These are identified as “peering” in this script.
Additionally there doesn’t seem to be a way to add a title to a graph but I resolved that by using Imagemagick’s “convert” on the image I got via the API.
You can see the script at: