From: Tom Hughes Date: Fri, 24 Feb 2023 22:24:58 +0000 (+0000) Subject: Run collectors as oneshot services X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/8f25e9cb3cb06e08537c740161c55a6fe46f8a18 Run collectors as oneshot services This ensures that the post step that renames the output won't run until the collector is finished. --- 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"