Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RRDData don't return all datas #112

Open
slade991 opened this issue Jan 27, 2024 · 3 comments
Open

RRDData don't return all datas #112

slade991 opened this issue Jan 27, 2024 · 3 comments

Comments

@slade991
Copy link

slade991 commented Jan 27, 2024

Hello,

I'm trying to pull RRDDatas for a vm with go-proxmox, however the data are not complete :
metrics, err := vm.RRDData(context.Background(), proxmox.TimeframeHour)

returns :

[00] &{MaxCPU:1 MaxMem:1073741824 Disk:0 MaxDisk:16106127360 Time:1706343600}
[00] &{MaxCPU:1 MaxMem:1073741824 Disk:0 MaxDisk:16106127360 Time:1706343660}
[00] &{MaxCPU:1 MaxMem:1073741824 Disk:0 MaxDisk:16106127360 Time:1706343720}
[00] &{MaxCPU:1 MaxMem:1073741824 Disk:0 MaxDisk:16106127360 Time:1706343780}
[00] &{MaxCPU:1 MaxMem:1073741824 Disk:0 MaxDisk:16106127360 Time:1706343840}
[00] &{MaxCPU:1 MaxMem:1073741824 Disk:0 MaxDisk:16106127360 Time:1706343900}
[00] &{MaxCPU:1 MaxMem:1073741824 Disk:0 MaxDisk:16106127360 Time:1706343960}
[00] &{MaxCPU:1 MaxMem:1073741824 Disk:0 MaxDisk:16106127360 Time:1706344020}
[00] &{MaxCPU:1 MaxMem:1073741824 Disk:0 MaxDisk:16106127360 Time:1706344080}
[00] &{MaxCPU:1 MaxMem:1073741824 Disk:0 MaxDisk:16106127360 Time:1706344140}
[00] &{MaxCPU:1 MaxMem:1073741824 Disk:0 MaxDisk:16106127360 Time:1706344200}
[00] &{MaxCPU:1 MaxMem:1073741824 Disk:0 MaxDisk:16106127360 Time:1706344260}
[00] &{MaxCPU:1 MaxMem:1073741824 Disk:0 MaxDisk:16106127360 Time:1706344320}
[00] &{MaxCPU:1 MaxMem:1073741824 Disk:0 MaxDisk:16106127360 Time:1706344380}
[00] &{MaxCPU:1 MaxMem:1073741824 Disk:0 MaxDisk:16106127360 Time:1706344440}
[00] &{MaxCPU:1 MaxMem:1073741824 Disk:0 MaxDisk:16106127360 Time:1706344500}
[00] &{MaxCPU:1 MaxMem:1073741824 Disk:0 MaxDisk:16106127360 Time:1706344560}
[00] &{MaxCPU:1 MaxMem:1073741824 Disk:0 MaxDisk:16106127360 Time:1706344620}
[00] &{MaxCPU:1 MaxMem:1073741824 Disk:0 MaxDisk:16106127360 Time:1706344680}
[00] &{MaxCPU:1 MaxMem:1073741824 Disk:0 MaxDisk:16106127360 Time:1706344740}
[00] &{MaxCPU:1 MaxMem:1073741824 Disk:0 MaxDisk:16106127360 Time:1706344800}
[00] &{MaxCPU:1 MaxMem:1073741824 Disk:0 MaxDisk:16106127360 Time:1706344860}
[00] &{MaxCPU:1 MaxMem:1073741824 Disk:0 MaxDisk:16106127360 Time:1706344920}
[00] &{MaxCPU:1 MaxMem:1073741824 Disk:0 MaxDisk:16106127360 Time:1706344980}
[00] &{MaxCPU:1 MaxMem:1073741824 Disk:0 MaxDisk:16106127360 Time:1706345040}
[00] &{MaxCPU:1 MaxMem:1073741824 Disk:0 MaxDisk:16106127360 Time:1706345100}
[00] &{MaxCPU:1 MaxMem:1073741824 Disk:0 MaxDisk:16106127360 Time:1706345160}
[00] &{MaxCPU:1 MaxMem:1073741824 Disk:0 MaxDisk:16106127360 Time:1706345220}
[00] &{MaxCPU:1 MaxMem:1073741824 Disk:0 MaxDisk:16106127360 Time:1706345280}
[00] &{MaxCPU:1 MaxMem:1073741824 Disk:0 MaxDisk:16106127360 Time:1706345340}
[00] &{MaxCPU:1 MaxMem:1073741824 Disk:0 MaxDisk:16106127360 Time:1706345400}
[00] &{MaxCPU:1 MaxMem:1073741824 Disk:0 MaxDisk:16106127360 Time:1706345460}
[00] &{MaxCPU:1 MaxMem:1073741824 Disk:0 MaxDisk:16106127360 Time:1706345520}

The datas are always the same as it only returns the "max" and there is a lot of stuff missing. If i compare it to :

pvesh get /nodes/mtl1/qemu/138/rrddata --timeframe=hour --output-format=json

which returns :

{"cpu":0.124238321859991,"disk":0,"diskread":0,"diskwrite":4724.05333333333,"maxcpu":1,"maxdisk":16106127360,"maxmem":1073741824,"mem":432397243.733333,"netin":9832.04666666667,"netout":14.38,"time":1706344620},{"cpu":0.125377080353475,"disk":0,"diskread":0,"diskwrite":4614.82666666667,"maxcpu":1,"maxdisk":16106127360,"maxmem":1073741824,"mem":432381952,"netin":10647.8133333333,"netout":22.1066666666667,"time":1706344680},{"cpu":0.12763936071886,"disk":0,"diskread":0,"diskwrite":2962.77333333333,"maxcpu":1,"maxdisk":16106127360,"maxmem":1073741824,"mem":432391782.4,"netin":11070.2933333333,"netout":29.5333333333333,"time":1706344740},{"cpu":0.127307933001489,"disk":0,"diskread":0,"diskwrite":8246.61333333333,"maxcpu":1,"maxdisk":16106127360,"maxmem":1073741824,"mem":432372121.6,"netin":10695.0533333333,"netout":21,"time":1706344800},{"cpu":0.124545909511637,"disk":0,"diskread":0,"diskwrite":3126.61333333333,"maxcpu":1,"maxdisk":16106127360,"maxmem":1073741824,"mem":432392874.666667,"netin":10415.1266666667,"netout":13.0266666666667,"time":1706344860},{"cpu":0.127210656369903,"disk":0,"diskread":0,"diskwrite":4246.18666666667,"maxcpu":1,"maxdisk":16106127360,"maxmem":1073741824,"mem":432387413.333333,"netin":10518.0533333333,"netout":22,"time":1706344920},{"cpu":0.125842717200846,"disk":0,"diskread":0,"diskwrite":3481.6,"maxcpu":1,"maxdisk":16106127360,"maxmem":1073741824,"mem":432383044.266667,"netin":10762.5466666667,"netout":12.16,"time":1706344980},{"cpu":0.128401595234267,"disk":0,"diskread":0,"diskwrite":5939.2,"maxcpu":1,"maxdisk":16106127360,"maxmem":1073741824,"mem":432385228.8,"netin":11247.9966666667,"netout":18.68,"time":1706345040},{"cpu":0.125352078722909,"disk":0,"diskread":0,"diskwrite":4191.57333333333,"maxcpu":1,"maxdisk":16106127360,"maxmem":1073741824,"mem":432388505.6,"netin":11359.26,"netout":22.3133333333333,"time":1706345100},{"cpu":0.12693991896238,"disk":0,"diskread":0,"diskwrite":4355.41333333333,"maxcpu":1,"maxdisk":16106127360,"maxmem":1073741824,"mem":432388505.6,"netin":11301.52,"netout":25.18,"time":1706345160},{"cpu":0.126816451857934,"disk":0,"diskread":0,"diskwrite":5256.53333333333,"maxcpu":1,"maxdisk":16106127360,"maxmem":1073741824,"mem":432386321.066667,"netin":11869.2633333333,"netout":18.84,"time":1706345220},{"cpu":0.126811605527418,"disk":0,"diskread":0,"diskwrite":2594.13333333333,"maxcpu":1,"maxdisk":16106127360,"maxmem":1073741824,"mem":432388505.6,"netin":11374.6933333333,"netout":15.42,"time":1706345280},{"cpu":0.124099103732564,"disk":0,"diskread":0,"diskwrite":0,"maxcpu":1,"maxdisk":16106127360,"maxmem":1073741824,"mem":432398336,"netin":10737.1366666667,"netout":22.3233333333333,"time":1706345340},{"cpu":0.124497920960517,"disk":0,"diskread":0,"diskwrite":286.72,"maxcpu":1,"maxdisk":16106127360,"maxmem":1073741824,"mem":432398336,"netin":10998.5666666667,"netout":20.82,"time":1706345400},{"cpu":0.125006141203898,"disk":0,"diskread":0,"diskwrite":54.6133333333333,"maxcpu":1,"maxdisk":16106127360,"maxmem":1073741824,"mem":432397243.733333,"netin":11047.36,"netout":16.38,"time":1706345460},{"cpu":0.124747998571836,"disk":0,"diskread":0,"diskwrite":0,"maxcpu":1,"maxdisk":16106127360,"maxmem":1073741824,"mem":432392874.666667,"netin":11656.4733333333,"netout":20.14,"time":1706345520}]

Here we have a lot more informations :
cpu, diskread, diskwrite, mem, netin, netout

Would it be possible to add the rest of the data instead of only MaxCPU, MaxMem, Disk and MaxDisk ?

Let me know if i'm missing something.

After checking it seems it have been added in this PR: #87

but it haven't made it's way to main ? I can't seem to have access to the branch "vm-updates".

@deependhulla
Copy link

if you are looking for Disk Size, its not computed, for Ceph I had to update code, sharing information if you would like to try out. , https://forum.proxmox.com/threads/vm-shows-0-0-disk-usage.114808/#post-587791

@slade991
Copy link
Author

slade991 commented Jan 27, 2024

I'm looking mostly for cpu, ram, netin, netout, diskread and diskwrite.

I can live without disksize, i didn't intended to show it anyway :)

However the other datas would be great.

@slade991
Copy link
Author

I kinda messed my commit as there is irrelevant things in it and it is messy, but the changes i did on my fork fixed the RrdDatas. You can see the commit here: slade991@1ddcfd6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants