Skip to content

Commit

Permalink
Update nagios_check_failing_nodes.rb
Browse files Browse the repository at this point in the history
Fixes:
No such file or directory @ rb_sysopen - http://localhost:8888/nodes.json (Errno::ENOENT)

See discussion in: #67
  • Loading branch information
sorano authored Dec 10, 2024
1 parent 065f676 commit 377dd34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion extra/nagios_check_failing_nodes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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'])

Expand Down

0 comments on commit 377dd34

Please sign in to comment.