From 71cd5a5e58f612c7344643a09d730a2f21750e86 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sat, 23 Aug 2025 15:22:31 +0100 Subject: [PATCH] Prevent smokeping hosts testing themselves --- cookbooks/prometheus/recipes/smokeping.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbooks/prometheus/recipes/smokeping.rb b/cookbooks/prometheus/recipes/smokeping.rb index e72a73a42..f272aee64 100644 --- a/cookbooks/prometheus/recipes/smokeping.rb +++ b/cookbooks/prometheus/recipes/smokeping.rb @@ -32,7 +32,7 @@ hosts = {} hosts[protocol] = if File.exist?(json_file) JSON.parse(IO.read(json_file)).filter_map do |name, address| - name unless address.start_with?("10.") + name unless name.split(".").first == node[:hostname] || address.start_with?("10.") end else [] -- 2.39.5