Hello, I am using a Docker version of Prometheus (the latest one) in which I am setting the value for the retention time (option *storage.tsdb.retention.time*) at launch. I trying first with small values like *1m* and *60s* (for 1 minute) or *5m* (for 5 minutes) but I was not able to see any deletion of the data after this period. Thus, I tested again this morning with an higher value: *2h* (for 2 hours). I have seen this information here <https://medium.com/@valyala/prometheus-storage-technical-terms-for-humans-4ab4de6c3d48> (in the retention section) that 2h is the minimum value for Prometheus, not sure if it is true or not. But even with this value, the data stored 4 hours ago can still be retrieved using the HTTP API. Here is my query: *curl 'http://172.18.0.3:9090/api/v1/query_range?query=go_memstats_alloc_bytes&start=2020-03-24T00:01:00.000Z&end=2020-03-24T17:00:00.000Z&step=15s'* .
On the Prometheus GUI, the flag for this option is correctly setup. Here is the Docker compose file that is used to launch Prometheus: prometheus: command: '--config.file=/etc/prometheus.yml --storage.tsdb.retention.time=2h' container_name: remi_prometheus depends_on: - cadvisor expose: - '9090' image: prom/prometheus:latest labels: project.run.user: remi networks: project-bridge: aliases: - prometheus ports: - published: 9090 target: 9090 volumes: - remi-prometheus:/prometheus:rw - /home/remi/Workspace/project/runtime/configuration/prometheus.yml: /etc/prometheus.yml:rw Note that I am using cAdvisor to populate Prometheus in which I get some Golang metrics. Thus here are my questions: - What am I doing wrong? - Was is the minimum value for storage.tsdb.retention.time? - Is there another option that overwrite the value set in storage.tsdb.retention.time that I am not aware of? - Is there a way to test that the option is working if the minimal value is 1 day? I guess it would be to change the system date, but not sure about it. Thanks for the help, Best regards and good luck if you are under confinement because of this damn virus :) -- You received this message because you are subscribed to the Google Groups "Prometheus Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/05a7987a-679b-4d17-bc8c-53096b913394%40googlegroups.com.