I have a test data that need to use to run tests. To generate this test data I've created prometheus + cadvisor containers and run some stress tests for 30 minutes. It generated me wal file with size of 2.8 mb. I need to keep this file for the later use, can I compact it somehow:
It is secured against crashes by a write-ahead log (WAL) that can be replayed when the Prometheus server restarts. Write-ahead log files are stored in the wal directory in 128MB segments. These files contain raw data that has not yet been compacted; thus they are significantly larger than regular block files.
If I understood correctly this file can be compacted to use much less space. Prometheus does this automatically after 2 hours, can I do it manually for custom files and then inject result into another prometheus to see the data?
Have created this script that seems to do the job: