VM PNG RRD API Statistics

SagnikS

Well-Known Member
Feb 23, 2018
43
2
48
23
Hello,
I'm using the Proxmox API to get png RRD statistics, but I'm receiving something like this:
Code:
{
    "data": {
        "filename": "/var/lib/rrdcached/db/pve2-vm/800_cpu.png",
        "image":"<encoded string>" }
}

What is it encoded in, and how should I decode it? Also, it doesn't seem to be documented properly in the API Viewer.`[/CODE]
 
Can you show how you call the API / which API endpoint?
 
Can you show how you call the API / which API endpoint?
Sorry for replying to this old topic, when running the same API above, i get 2 variables returned:

filename
image

The filename i cannot use remote, the image contains raw binary PNG i think?

When I encode that to base64 and display it into an img with src:
data:image/png;base64, {base64here}
the image won't work.

Even if I create a png with the data from the image variable directly the picture isn't working.


Can i get some help?
 
Last edited: