X-Git-Url: https://git.openstreetmap.org/chef.git/blobdiff_plain/db461a97bcf17eae463e932f9cf4d6f3cc1bb81f..ed01537d8749e38350d6a52c4cc9be473b2c44c4:/cookbooks/prometheus/resources/exporter.rb diff --git a/cookbooks/prometheus/resources/exporter.rb b/cookbooks/prometheus/resources/exporter.rb index ba214b5d6..5896a1b46 100644 --- a/cookbooks/prometheus/resources/exporter.rb +++ b/cookbooks/prometheus/resources/exporter.rb @@ -23,12 +23,14 @@ property :exporter, :kind_of => String, :name_property => true property :port, :kind_of => Integer, :required => [:create] property :listen_switch, :kind_of => String, :default => "web.listen-address" property :options, :kind_of => [String, Array] +property :environment, :kind_of => Hash, :default => {} action :create do systemd_service service_name do description "Prometheus #{new_resource.exporter} exporter" type "simple" user "root" + environment new_resource.environment exec_start "#{executable_path} #{executable_options}" private_tmp true protect_system "strict"