Skip to content

Commit

Permalink
Merge pull request #254 from redBorder/development
Browse files Browse the repository at this point in the history
Release 4.6.1
  • Loading branch information
rgomezborder authored Nov 14, 2024
2 parents 42ee4e2 + 227c417 commit 7859614
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 5 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
cookbook-rb-manager CHANGELOG
===============

## 4.6.1

- Rafa Gómez
- [b873b58] skip child proxy sensors
- jnavarrorb
- [b450479] fix pipelines for flow if proxy has flow sensors

## 4.6.0

- David Vanhoucke
Expand Down
5 changes: 3 additions & 2 deletions resources/libraries/get_pipelines.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ def get_pipelines
main_logstash = determine_main_logstash_node()
monitor_sensor_in_proxy_nodes = find_sensor_in_proxy_nodes('device')
vault_sensor_in_proxy_nodes = find_sensor_in_proxy_nodes('vault')
flow_sensor_in_proxy_nodes = find_sensor_in_proxy_nodes('flow')
monitor_config = get_monitor_configuration()
has_device_sensors = !sensors['device-sensor'].nil? && !sensors['device-sensor'].empty?

Expand All @@ -15,8 +16,8 @@ def get_pipelines
logstash_pipelines.push('scanner-pipeline') unless sensors['scanner-sensor'].empty?
logstash_pipelines.push('nmsp-pipeline') if main_logstash == node.name && !sensors['flow-sensor'].empty?
logstash_pipelines.push('radius-pipeline') if main_logstash == node.name
logstash_pipelines.push('netflow-pipeline') unless sensors['flow-sensor'].empty?
logstash_pipelines.push('sflow-pipeline') unless sensors['flow-sensor'].empty?
logstash_pipelines.push('netflow-pipeline') unless sensors['flow-sensor'].empty? && flow_sensor_in_proxy_nodes.empty?
logstash_pipelines.push('sflow-pipeline') unless sensors['flow-sensor'].empty? && flow_sensor_in_proxy_nodes.empty?
logstash_pipelines.push('meraki-pipeline') unless sensors['meraki-sensor'].empty?
logstash_pipelines.push('monitor-pipeline') unless namespaces.empty?
logstash_pipelines.push('intrusion-pipeline') unless sensors['ips-sensor'].empty? && sensors['ipsv2-sensor'].empty? && sensors['ipscp-sensor'].empty? && sensors['ipsg-sensor'].empty?
Expand Down
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 childs of 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
2 changes: 1 addition & 1 deletion resources/metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
maintainer_email '[email protected]'
license 'AGPL-3.0'
description 'Installs/Configures redborder manager'
version '4.6.0'
version '4.6.1'

depends 'rb-common'
depends 'chef-server'
Expand Down
4 changes: 2 additions & 2 deletions resources/recipes/prepare_system.rb
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@
node.default['redborder']['memcached']['hosts'] = memcached_hosts
end

# get sensors info
# get sensors info (skipping childs of proxy sensors)
node.run_state['sensors_info'] = get_sensors_info

# get sensors info full info
# get sensors info full info of all sensors
node.run_state['sensors_info_all'] = get_sensors_all_info

# get namespaces
Expand Down

0 comments on commit 7859614

Please sign in to comment.