Data retention for prometheus & QAN for PMM appliance.

I see the doc’s mention how to manage this if running PMM in Docker, but can’t seem to find out how to change the retention period for QAN and prometheus in the appliance. Any insight would be great. Thanks.

as I know

we can manage the retnetion period for QAN and prometheus like this :

docker run -d
-p 80:80
–volumes-from pmm-data
–name pmm-server
–restart always

–note added by Percona Community Manager, going forward using pmm-server:n rather than pmm-server:latest is best practice, our advice changed since the user wrote this post. In this case pmm-server:1 would have been appropriate for these code examples.

I see you running PMM in docker. That’s not my situation.

To be clear, i’m trying to change retention for the PMM Virtual Appliance running in a virtualized environment.


want to know this as well, any info? :slight_smile:


First of all - it is not recommended to do any changes directly in configs.
Potentially you can get broken system because PMM has configuration service which also makes changes in configs.
PMM Team is working on adding “Setting page” for all kind of images.

for METRICS_MEMORY it is not needed to change anything, it changes automatically according to your instance size.
if you want to change anyway, fix option inside /usr/lib/systemd/system/prometheus.service
for METRICS_RETENTION change --storage.local.retention value inside /etc/sysconfig/prometheus
for QUERIES_RETENTION change INTERVAL in /etc/cron.daily/purge-qan-data

please remember - after such changes, you can get a broken PMM during some actions like - external exporters adding, etc.

I think that the file to be modified is

vi /etc/supervisord.d/pmm.ini
… --storage.local.retention=1440h0m0s …
a stop start of the pmm-server is required for changes to be efective.