From 377dd349752516085861d7be2de6039af5bc6515 Mon Sep 17 00:00:00 2001 From: Sorano Date: Tue, 10 Dec 2024 13:04:33 +0100 Subject: [PATCH] Update nagios_check_failing_nodes.rb Fixes: No such file or directory @ rb_sysopen - http://localhost:8888/nodes.json (Errno::ENOENT) See discussion in: https://github.com/ytti/oxidized/issues/67 --- extra/nagios_check_failing_nodes.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extra/nagios_check_failing_nodes.rb b/extra/nagios_check_failing_nodes.rb index 7ef099835..bdc12096a 100755 --- a/extra/nagios_check_failing_nodes.rb +++ b/extra/nagios_check_failing_nodes.rb @@ -10,7 +10,7 @@ critical_nodes = [] pending_nodes = [] -json = JSON.parse(open("http://localhost:8888/nodes.json").read) +json = JSON.parse(URI("http://localhost:8888/nodes.json").open(&:read)) json.each do |node| next if !ARGV.empty? && (ARGV[0] != node['name'])