Skip to content

Commit

Permalink
skip child proxy sensors
Browse files Browse the repository at this point in the history
  • Loading branch information
rgomezborder authored Nov 10, 2024
1 parent 567291f commit b873b58
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions resources/libraries/get_sensors_info.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ def get_sensors_info
sensors = search(:node, "role:#{s_type}").sort
sensors_info[s_type] = {}
sensors.each do |s|
# skip child proxy sensors
if s['redborder']['parent_id']
parent_sensor = search(:node, "sensor_id:#{s['redborder']['parent_id']}").first
next if parent_sensor && parent_sensor.to_s.include?('proxy')
end
info = {}
info['name'] = s.name
info['ip'] = s['ipaddress']
Expand Down

0 comments on commit b873b58

Please sign in to comment.