diff --git a/docker-compose.yml b/docker-compose.yml index d6da5fc..60cc496 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -13,6 +13,8 @@ services: volumes: - "prometheus_data:/prometheus" - "prometheus_file_sd:/prometheus_file_sd" + environment: + DATA_RETENTION_DAYS: 15 manager: build: ./manager image: "manager.dms.dnp.dappnode.eth:1.0.1" diff --git a/prometheus/Dockerfile b/prometheus/Dockerfile index e2828e4..e90c4d9 100644 --- a/prometheus/Dockerfile +++ b/prometheus/Dockerfile @@ -1,3 +1,8 @@ FROM prom/prometheus COPY prometheus.yml /etc/prometheus/ + +ENTRYPOINT [ "sh","-c","/bin/prometheus --config.file=/etc/prometheus/prometheus.yml \ + --storage.tsdb.path=/prometheus \ + --web.console.libraries=/usr/share/prometheus/console_libraries \ + --storage.tsdb.retention.time=${DATA_RETENTION_DAYS}d" ] diff --git a/setup-wizard.yml b/setup-wizard.yml new file mode 100644 index 0000000..40343d2 --- /dev/null +++ b/setup-wizard.yml @@ -0,0 +1,14 @@ +version: "2" +fields: + - id: log-retention-time + target: + type: environment + name: DATA_RETENTION_DAYS + service: prometheus + title: Log Retention Time + description: >- + Define how much time the logs/data of your applications will be stored. By default, this time is set up to 15 days. + Take care of using a big number because the logs can occupy so much disk space. The unit measure is days. So if you define 30, the retention time will be 30 days. + pattern: "^[0-9]*$" + patternErrorMessage: "The input must contain only numbers." + required: false