From d311d4b84099fdffbc02be0cf42e5db4cce9dd15 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Mon, 27 Jun 2022 17:42:25 +0200 Subject: [PATCH] Increase nfiles in the systemd unit. --- defaults/main.yml | 3 ++- templates/prometheus.service.j2 | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/defaults/main.yml b/defaults/main.yml index 0991738..33a9ef8 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -10,4 +10,5 @@ prometheus_confdir: '/opt/prometheus/conf' prometheus_cmd: '{{ prometheus_dist_dir }}/{{ prometheus_dir }}/prometheus' prometheus_loglevel: info prometheus_http_port: 9090 -prometheus_opts: '--storage.tsdb.retention=120d' +prometheus_opts: '--storage.tsdb.retention.time=120d' +# --storage.tsdb.retention.size=512GB diff --git a/templates/prometheus.service.j2 b/templates/prometheus.service.j2 index eea2fc0..e63614c 100644 --- a/templates/prometheus.service.j2 +++ b/templates/prometheus.service.j2 @@ -7,6 +7,8 @@ After=network.target Type=simple User={{ prometheus_user }} Group={{ prometheus_user }} +LimitCORE=infinity +LimitNOFILE=65536 EnvironmentFile=/etc/default/prometheus ExecStart={{ prometheus_cmd }} $PROMETHEUS_STARTUP_OPTS ExecReload=/bin/kill -HUP $MAINPID