When using a custom storage.local.path, such as /var/lib/prometheus, the service will fail to start as this directory does not exist and can't be created. This directory can and should be explicitly created.
I was also curious why the default storage directory is /tmp/metrics - the tmp directory gets cleared on reboot and under other circumstances so using it for data storage seems like it has the potential to cause confusion and pain.
When using a custom storage.local.path, such as
/var/lib/prometheus
, the service will fail to start as this directory does not exist and can't be created. This directory can and should be explicitly created.I was also curious why the default storage directory is
/tmp/metrics
- thetmp
directory gets cleared on reboot and under other circumstances so using it for data storage seems like it has the potential to cause confusion and pain.