]> git.openstreetmap.org Git - chef.git/commitdiff
Make prometheus exporters start after the network is available
authorTom Hughes <tom@compton.nu>
Wed, 6 Jul 2022 19:54:04 +0000 (20:54 +0100)
committerTom Hughes <tom@compton.nu>
Wed, 6 Jul 2022 19:54:04 +0000 (20:54 +0100)
cookbooks/prometheus/resources/exporter.rb

index a69d940a0b1d61e006c733567e115c8fb11fab3d..e1f56b09cf71799bbe74ee735b4e6a3ed181caba 100644 (file)
@@ -36,6 +36,8 @@ property :register_target, :kind_of => [TrueClass, FalseClass], :default => true
 
 action :create do
   systemd_service service_name do
+    after "network-online.target"
+    wants "network-online.target"
     description "Prometheus #{new_resource.exporter} exporter"
     type "simple"
     user new_resource.user