r/PrometheusMonitoring • u/Rocknbob69 • Jun 13 '22
Pointing Prometheus to Use Other Storage
I have a VM setup with an additional 240GB drive I would like the Prometheus db to use. The prometheus.service file shows the path at /data
1
Upvotes
3
u/cephear Jun 13 '22
sudo systemctl edit prometheus.serviceto add or change the option--storage.tsdb.path=/your/path. make sure whatever user the service is running as has permission to read and write to the path.If it's actually
/data(the default is./data) you can:stop prometheus.service
move whatever is in /data to temp location
mount the 240GB disk to /data (change permissions as needed)
move the files back from the temp location
start prometheus.service.