From cf566ba5f7a5556895b1f71f079e41bcd5f4e8d0 Mon Sep 17 00:00:00 2001 From: Stan Rudenko Date: Sat, 19 Aug 2023 00:11:33 -0700 Subject: [PATCH] flags are different for agent mode Signed-off-by: Stan Rudenko --- roles/prometheus/templates/prometheus.service.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/prometheus/templates/prometheus.service.j2 b/roles/prometheus/templates/prometheus.service.j2 index bbab7f8d7..ea41d64a4 100644 --- a/roles/prometheus/templates/prometheus.service.j2 +++ b/roles/prometheus/templates/prometheus.service.j2 @@ -23,6 +23,7 @@ ExecStart={{ _prometheus_binary_install_dir }}/prometheus \ {% endif %} {% else %} --enable-feature=agent \ + --storage.agent.path={{ prometheus_db_dir }} \ {% endif %} {% if prometheus_version is version('2.24.0', '>=') %} --web.config.file={{ prometheus_config_dir }}/web.yml \ @@ -58,7 +59,6 @@ RestrictSUIDSGID=true {% if (ansible_facts.packages.systemd | first).version is version('231', '>=') %} ReadWritePaths={{ prometheus_db_dir }} -WorkingDirectory={{ prometheus_db_dir }} {% for path in prometheus_read_only_dirs %} ReadOnlyPaths={{ path }} {% endfor %}