bin/check-consul-failures.rb in sensu-plugins-consul-2.2.0 vs bin/check-consul-failures.rb in sensu-plugins-consul-2.2.1
- old
+ new
@@ -79,10 +79,10 @@
puts "Removing failed node: #{node['Name']}"
RestClient::Resource.new(
"#{config[:scheme]}://#{config[:server]}:#{config[:port]}/v1/agent/force-leave/#{node['Name']}",
timeout: 5,
headers: { 'X-Consul-Token' => config[:token] }
- ).get
+ ).put
nodes_names.delete(node['Name'])
end
ok 'All clear' if nodes_names.empty?
critical "Found failed nodes: #{nodes_names}" if config[:critical]
warning "Found failed nodes: #{nodes_names}"