]> git.openstreetmap.org Git - chef.git/commitdiff
Run collectors as oneshot services
authorTom Hughes <tom@compton.nu>
Fri, 24 Feb 2023 22:24:58 +0000 (22:24 +0000)
committerTom Hughes <tom@compton.nu>
Fri, 24 Feb 2023 22:34:53 +0000 (22:34 +0000)
This ensures that the post step that renames the output won't
run until the collector is finished.

cookbooks/prometheus/resources/collector.rb

index 1dfd8764df27e873b727caf7a34e8a688b22d4d6..9a4870f24d67dd74222c88a96140a7fdcd861c55 100644 (file)
@@ -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"