diff --git a/resources/libraries/get_sensors_info.rb b/resources/libraries/get_sensors_info.rb index 7801ac9..ef92308 100644 --- a/resources/libraries/get_sensors_info.rb +++ b/resources/libraries/get_sensors_info.rb @@ -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']