prometheus --storage.tsdb.path=/var/lib/prometheus

Category: Monitoring & Observability

prometheus --storage.tsdb.path=/var/lib/prometheus

Set the TSDB data directory for Prometheus

Points the TSDB (time series database) at a specific directory, defaulting to ./data in the working directory. Put it on a fast disk with room for at least two blocks plus head block headroom. Keep the path consistent across restarts or Prometheus starts a fresh empty database.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.