Metric Server - How to change update interval

TheRealMaN_

New Member
Jul 2, 2023
7
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:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!