prometheus: add customizable storage retention, default to 10 years
This commit is contained in:
@@ -2,5 +2,6 @@
|
||||
|
||||
prometheus_scrape_interval: 5s
|
||||
prometheus_evaluation_interval: 15s
|
||||
prometheus_storage_retention: 3650d
|
||||
prometheus_install_grafana: false
|
||||
prometheus_hcloud_relabel_configs: []
|
||||
|
||||
@@ -14,6 +14,11 @@ argument_specs:
|
||||
type: str
|
||||
required: false
|
||||
default: 15s
|
||||
prometheus_storage_retention:
|
||||
description: Period of time for which prometheus metrics are stored for. A number followed by unit (s, m, h, d, w, y)
|
||||
type: str
|
||||
required: false
|
||||
default: 3650d
|
||||
prometheus_hcloud_token:
|
||||
description: Access token for hetzner cloud service discovery. It will be enabled if this variable is defined
|
||||
type: str
|
||||
|
||||
@@ -7,6 +7,13 @@
|
||||
docker_service: prometheus
|
||||
docker_image: prom/prometheus
|
||||
reverse_proxy_type: none
|
||||
docker_command:
|
||||
- "--config.file=/etc/prometheus/prometheus.yml"
|
||||
- "--storage.tsdb.path=/prometheus"
|
||||
- "--storage.tsdb.retention={{ prometheus_storage_retention }}"
|
||||
- "--web.console.libraries=/usr/share/prometheus/console_libraries"
|
||||
- "--web.console.templates=/usr/share/prometheus/consoles"
|
||||
|
||||
docker_volumes:
|
||||
- name: data
|
||||
path: /prometheus
|
||||
|
||||
Reference in New Issue
Block a user