X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/2a67fe15cfd49735c38c944cf84481de6d126c6a..6ab5fb9c6d2e0d309835648e78333ed40d654885:/cookbooks/prometheus/resources/collector.rb?ds=sidebyside diff --git a/cookbooks/prometheus/resources/collector.rb b/cookbooks/prometheus/resources/collector.rb index dc9c995a0..ef103c3c0 100644 --- a/cookbooks/prometheus/resources/collector.rb +++ b/cookbooks/prometheus/resources/collector.rb @@ -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