Hi,
The existing API supports getting the RRD data in etiher raw (image) or base64 format.
/api/v0/devices/:hostname/:type
output: Set how the graph should be outputted (base64, display), defaults to display.
I would like to be able to specify a third option - perharps output=data , where it would run a rrd query instead of a rrd graph, and return the raw data as a lump of JSON.
I can probably code this myself - would there be any interest / how likely is it to get accepted??
Hi… i already have that installed. My problem is getting from the datasource name (like device_power) to the filename of the RRD file, and how many reading etc are in the file.
Ive looked at the code, and concluded its would be a LOT of work to unpick it and return this.
Its all structured around various modules for each device class, which build up a shell command to pass to rrdgraph.
This shell command contains the stuff I want (ie, rrd filename, descriptions of the various lines that are required, labels etc), but its all munged together as a command line
I think the best that can be done without a major re-write would be to return the rrdgraph command, and for me to parse it outwith librenms.
I dont this this is going to get accepted as a merge, since im probably the only person in the world wanting API access to the RRD command line by device
I started working on something that would help, but I am a long ways off from it being done and I am currently not working on it. Any help would be appreciated.
Hi…
Im afraid ive given up on this one - it would involve abstracting away all the logic in the various device specific modules, and I dont have 99% of the devices to even test against.
Its also PHP, which im not that keen to get back into in a major way