From 8f25e9cb3cb06e08537c740161c55a6fe46f8a18 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Fri, 24 Feb 2023 22:24:58 +0000 Subject: [PATCH] Run collectors as oneshot services This ensures that the post step that renames the output won't run until the collector is finished. --- cookbooks/prometheus/resources/collector.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/cookbooks/prometheus/resources/collector.rb b/cookbooks/prometheus/resources/collector.rb index 1dfd8764d..9a4870f24 100644 --- a/cookbooks/prometheus/resources/collector.rb +++ b/cookbooks/prometheus/resources/collector.rb @@ -36,6 +36,7 @@ property :protect_kernel_modules, [true, false] action :create do systemd_service service_name do description "Prometheus #{new_resource.collector} collector" + type "oneshot" user new_resource.user dynamic_user new_resource.user.nil? group "adm" -- 2.39.5