]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/prometheus/resources/collector.rb
Update board wiki to 1.37
[chef.git] / cookbooks / prometheus / resources / collector.rb
index dc9c995a047a1304dfc87416d5e65506d11bd196..ef103c3c0733d778c7fe84d9a56b0aaffd12cf48 100644 (file)
@@ -17,6 +17,8 @@
 # limitations under the License.
 #
 
+unified_mode true
+
 default_action :create
 
 property :collector, :kind_of => String, :name_property => true
@@ -64,6 +66,10 @@ action :delete do
   systemd_service service_name do
     action :delete
   end
+
+  file "/var/lib/prometheus/node-exporter/#{new_resource.collector}.prom" do
+    action :delete
+  end
 end
 
 action_class do
@@ -72,7 +78,7 @@ action_class do
   end
 
   def executable_path
-    "/opt/prometheus/collectors/#{new_resource.collector}/#{new_resource.collector}_collector"
+    "/opt/prometheus-exporters/collectors/#{new_resource.collector}/#{new_resource.collector}_collector"
   end
 
   def executable_options