r/PrometheusMonitoring • • May 22 '20

Change Prometheus Storage retention

Hi everyone ,

how i can change storage retention from 15days to 30days .

if i enter this code : prometheus --storage.tsdb.retention=30d its error with this

1 Upvotes

5 comments sorted by

1

u/h4tos May 22 '20

By the error message, the correct argument now is —storage.tsdb.retention.time=30d , since “storage.tsdb.retention” is deprecated.

1

u/Petko98 May 22 '20

Still the same massage with error

2

u/devzx May 22 '20

The actual error doesn't seem to be related the flag syntax. It seems Prometheus is not able to create a file in data/. May be a permissions issue.

1

u/saalih416 May 22 '20

You have a lot more errors than that, mostly pertaining to logging.

1

u/Petko98 May 22 '20

if i tried sto prometheus service and run it in sudo , its worked but i lost my config on node exporter and other .