Metric Server - How to change update interval

TheRealMaN_

New Member
Jul 2, 2023
12
0
1
How can I change update interval to 30 min for example? Or is it possible to enable/disable already added metric server entry via terminal cli command?
 
Last edited:
Answer to myself) As a solution, you can add a cron job to enable/disable already existed (added via GUI) server metrics export to influxdb item, if you want to change update interval to... let's say every 15m instead of default 10s.
Just add a cron job that runs enable/disable command every 15 min.

Command to Enable server metrics export:
Bash:
pvesh set cluster/metrics/server/influxDB-cloud-server --port 443 --server aws.cloud2.influxdata.com -disable 0

Disable it again:
Bash:
pvesh set cluster/metrics/server/influxDB-cloud-server --port 443 --server aws.cloud2.influxdata.com -disable 1

where --server and --port are values related of InfluxDB host. "influxDB-cloud-server" is the name of item added via Proxmox VE GUI

Or as another approach, maybe you can change the line 610 in perl source pvestatd.pm file and compile it?
https://git.proxmox.com/?p=pve-manager.git;a=blob;f=PVE/Service/pvestatd.pm;hb=HEAD

Perl:
my $updatetime = 10;
 
Last edited: