add retention time to prometheus

This commit is contained in:
Camille Prugnard 2021-10-01 17:13:20 +02:00
parent 7bffb508cd
commit b537ee316c
2 changed files with 3 additions and 0 deletions

View File

@ -14,6 +14,8 @@ prometheus_postgres_exporter_host: "/var/run/postgresql/"
prometheus_postgres_exporter_sslmode: "disable"
prometheus_postgres_exporter_user: "postgres"
prometheus_retention_time: "15d"
prometheus_server_enable: false
prometheus_server_global_evaluation_interval: 15
prometheus_server_global_scrape_interval: 15

View File

@ -50,6 +50,7 @@
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--storage.tsdb.retention.time={{ prometheus_retention_time }}'
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
- '--web.console.templates=/usr/share/prometheus/consoles'
- '--web.enable-admin-api'