prometheus: allow setting custom retention time
15 days is default and also too short.
This commit is contained in:
parent
5ba04824f1
commit
be7eca3a89
3 changed files with 15 additions and 1 deletions
|
|
@ -8,6 +8,14 @@
|
|||
path: /etc/prometheus/conf.d
|
||||
state: directory
|
||||
|
||||
- name: Configure prometheus retention time
|
||||
when: retention is defined
|
||||
lineinfile:
|
||||
path: /etc/conf.d/prometheus
|
||||
regexp: "^prometheus_retention_time="
|
||||
line: "prometheus_retention_time={{ retention }}"
|
||||
notify: restart prometheus
|
||||
|
||||
- name: Configure prometheus
|
||||
copy:
|
||||
dest: /etc/prometheus/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue