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.
No question. Just a post and pointer to a solution that we found for SFMIX. The code pointed to also shows some API arguments that are not (well) documented but are in the LibreNMS code that we found useful.
Hi - I’m new here and new to LibreNMS as well.
I’ve been asked to setup an API call to grab a disk usage graph once a week for one of the servers we are monitoring.
I’ve got as far as getting the graph -
curl -X GET -H ‘X-Auth-Token: xxxxx’ -i ‘http://librenms.ourdomain.net/api/v0/devices/16/graphs/health/device_storage’
But I need to add a date range to this - ie, i want to get the information from the last week. Any help would be appriciaited