From bc111d6e60cc760492a1c54f8f4f03e2dde3cd5d Mon Sep 17 00:00:00 2001 From: nilsver Date: Fri, 29 Nov 2024 14:02:07 +0000 Subject: [PATCH 1/4] remove splittraffic_check --- resources/providers/config.rb | 2 +- resources/templates/default/sflow_enrichment.conf.erb | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/resources/providers/config.rb b/resources/providers/config.rb index 7bf0ac0..293b4f1 100644 --- a/resources/providers/config.rb +++ b/resources/providers/config.rb @@ -284,7 +284,7 @@ mode '0644' ignore_failure true cookbook 'logstash' - variables(flow_nodes: flow_nodes, split_traffic_logstash: split_traffic_logstash) + variables(flow_nodes: flow_nodes) notifies :restart, 'service[logstash]', :delayed unless node['redborder']['leader_configuring'] end diff --git a/resources/templates/default/sflow_enrichment.conf.erb b/resources/templates/default/sflow_enrichment.conf.erb index 45a1cc0..4d0d27b 100644 --- a/resources/templates/default/sflow_enrichment.conf.erb +++ b/resources/templates/default/sflow_enrichment.conf.erb @@ -1,9 +1,7 @@ filter { <% @flow_nodes.each do |flow_node| %> <% if !flow_node[:ipaddress].nil? and !flow_node["redborder"].nil? and flow_node["redborder"]["blocked"]!=true %> - <% if @split_traffic_logstash %> if [sensor_ip] == "<%=flow_node[:ipaddress].to_s%>" { - <% end %> <% @observation_id = (flow_node["redborder"]["observation_id"] and !flow_node["redborder"]["observation_id"].empty?) ? flow_node["redborder"]["observation_id"] : "default" %> if [observation_id] == "<%=@observation_id%>" { mutate { @@ -19,9 +17,7 @@ filter { } } } - <% if @split_traffic_logstash %> - } # if [sensor_ip] == "<%=flow_node[:ipaddress].to_s%>" - <% end %> + } <% end %> <% end %> } \ No newline at end of file From a0a9c772ad693e22cfa9b9a4bf183cf6f2aa95c2 Mon Sep 17 00:00:00 2001 From: nilsver Date: Tue, 3 Dec 2024 11:27:04 +0000 Subject: [PATCH 2/4] check should be reversed --- resources/templates/default/sflow_enrichment.conf.erb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/resources/templates/default/sflow_enrichment.conf.erb b/resources/templates/default/sflow_enrichment.conf.erb index 4d0d27b..e0a625f 100644 --- a/resources/templates/default/sflow_enrichment.conf.erb +++ b/resources/templates/default/sflow_enrichment.conf.erb @@ -1,7 +1,9 @@ filter { <% @flow_nodes.each do |flow_node| %> <% if !flow_node[:ipaddress].nil? and !flow_node["redborder"].nil? and flow_node["redborder"]["blocked"]!=true %> + <% unless @split_traffic_logstash %> if [sensor_ip] == "<%=flow_node[:ipaddress].to_s%>" { + <% end %> <% @observation_id = (flow_node["redborder"]["observation_id"] and !flow_node["redborder"]["observation_id"].empty?) ? flow_node["redborder"]["observation_id"] : "default" %> if [observation_id] == "<%=@observation_id%>" { mutate { @@ -17,7 +19,9 @@ filter { } } } - } + <% unless @split_traffic_logstash %> + } # unless [sensor_ip] == "<%=flow_node[:ipaddress].to_s%>" + <% end %> <% end %> <% end %> } \ No newline at end of file From 46dfb87837293e9b7bb50e61c9a345890f14ca29 Mon Sep 17 00:00:00 2001 From: nilsver Date: Thu, 26 Dec 2024 16:14:38 +0000 Subject: [PATCH 3/4] undo previous change --- resources/providers/config.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/providers/config.rb b/resources/providers/config.rb index 293b4f1..7bf0ac0 100644 --- a/resources/providers/config.rb +++ b/resources/providers/config.rb @@ -284,7 +284,7 @@ mode '0644' ignore_failure true cookbook 'logstash' - variables(flow_nodes: flow_nodes) + variables(flow_nodes: flow_nodes, split_traffic_logstash: split_traffic_logstash) notifies :restart, 'service[logstash]', :delayed unless node['redborder']['leader_configuring'] end From 2914a0f1a26bda9c6ab4c7b02389cc8b66e6d1e7 Mon Sep 17 00:00:00 2001 From: Juan Soto Date: Thu, 23 Jan 2025 14:02:37 +0000 Subject: [PATCH 4/4] Release 6.1.1 --- CHANGELOG.md | 6 ++++++ resources/metadata.rb | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 374a7e4..ce1eb6e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ cookbook-logstash CHANGELOG =============== +## 6.1.1 + + - nilsver + - [a0a9c77] check should be reversed + - [bc111d6] remove splittraffic_check + ## 6.1.0 - David Vanhoucke diff --git a/resources/metadata.rb b/resources/metadata.rb index 27da227..799ed84 100644 --- a/resources/metadata.rb +++ b/resources/metadata.rb @@ -3,4 +3,4 @@ maintainer_email 'git@redborder.com' license 'AGPL-3.0' description 'Installs/Configures cookbook-logstash' -version '6.1.0' +version '6.1.1'