Corsinvest / cv4pve-metrics

Metrics for Proxmox VE, Grafana with dasboard, InfluxDb
https://www.cv4pve-tools.com
Other
64 stars 10 forks source link

cv4pve-metrics-vzdump.sh not working with proxmox 6.3-6 #2

Closed jdd272 closed 2 years ago

jdd272 commented 3 years ago

Hi,

First of all thanks for this great tool, I've been using this since a few months to monitor my Proxmox server running my Homelab... Since 2 weeks I upgraded proxmox from 5.X to the latest 6.3.6 and since then the cv4pve-metrics-vzdump.sh script stopped working => data is missing from the PVE Backup VZdump dashboard The script errors out " : syntax error: invalid arithmetic operator (error token is ".1 ") "

I found out it's because :

where the speed was " 38 MB/s " it is now " 38.1 MiB/s " in the log filees

I replaced this line as a workaround just to round the decimal

speed=$((cat ${LOGFILE} | grep -o -P "(?<=seconds \().*(?= MiB/s)"))

speed=$((cat ${LOGFILE} | grep -o -P "(?<=seconds \().*(?= MiB/s)"| awk '{printf("%d\n",$1 + 0.5)}'))