]> git.openstreetmap.org Git - chef.git/commitdiff
Allow exim exporter to enumerate other processes
authorTom Hughes <tom@compton.nu>
Sat, 3 Dec 2022 15:45:30 +0000 (15:45 +0000)
committerTom Hughes <tom@compton.nu>
Sat, 3 Dec 2022 15:45:30 +0000 (15:45 +0000)
cookbooks/exim/recipes/default.rb
cookbooks/prometheus/resources/exporter.rb

index 26a07e3ae7003104c17f603061007007ac0a0820..30617cc8e3da18a4877fba292dae0353ef52dd19 100644 (file)
@@ -225,6 +225,7 @@ munin_plugin "exim_mailstats"
 prometheus_exporter "exim" do
   port 9636
   user "Debian-exim"
+  protect_proc "default"
 end
 
 if node[:exim][:smarthost_name]
index d0ee2021526496e5b1d9d5454633ce10593f86d8..ac970426b03410e06885fdffdd7ebfd9ab5bd0d2 100644 (file)
@@ -30,6 +30,7 @@ property :user, :kind_of => String
 property :command, :kind_of => String
 property :options, :kind_of => [String, Array]
 property :environment, :kind_of => Hash, :default => {}
+property :protect_proc, String
 property :proc_subset, String
 property :private_devices, [true, false]
 property :protect_clock, [true, false]
@@ -52,6 +53,7 @@ action :create do
     environment new_resource.environment
     exec_start "#{executable_path} #{new_resource.command} #{executable_options}"
     sandbox :enable_network => true
+    protect_proc new_resource.protect_proc if new_resource.property_is_set?(:protect_proc)
     proc_subset new_resource.proc_subset if new_resource.property_is_set?(:proc_subset)
     private_devices new_resource.private_devices if new_resource.property_is_set?(:private_devices)
     protect_clock new_resource.protect_clock if new_resource.property_is_set?(:protect_clock)