mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-21 16:33:08 +01:00
if in dmz_nodes dont add to filebeta
This commit is contained in:
@@ -443,6 +443,13 @@ output.logstash:
|
||||
|
||||
# The Logstash hosts
|
||||
hosts:
|
||||
{# dont let filebeat send to a node designated as dmz #}
|
||||
{% import_yaml 'logstash/dmz_nodes.yaml' as dmz_nodes -%}
|
||||
{% if dmz_nodes.logstash.dmz_nodes -%}
|
||||
{% set dmz_nodes = dmz_nodes.logstash.dmz_nodes -%}
|
||||
{% else -%}
|
||||
{% set dmz_nodes = [] -%}
|
||||
{% endif -%}
|
||||
{%- if grains.role in ['so-sensor', 'so-fleet', 'so-node', 'so-idh'] %}
|
||||
{%- set LOGSTASH = namespace() %}
|
||||
{%- set LOGSTASH.count = 0 %}
|
||||
@@ -451,8 +458,10 @@ output.logstash:
|
||||
{%- for node_type, node_details in node_data.items() | sort -%}
|
||||
{%- if node_type in ['manager', 'managersearch', 'standalone', 'receiver' ] %}
|
||||
{%- for hostname in node_data[node_type].keys() %}
|
||||
{%- set LOGSTASH.count = LOGSTASH.count + 1 %}
|
||||
{%- if hostname not in dmz_nodes %}
|
||||
{%- set LOGSTASH.count = LOGSTASH.count + 1 %}
|
||||
- "{{ hostname }}:5644" #{{ node_details[hostname].ip }}
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
{%- endif %}
|
||||
{%- if LOGSTASH.count > 1 %}
|
||||
|
||||
9
salt/logstash/dmz_nodes.yaml
Normal file
9
salt/logstash/dmz_nodes.yaml
Normal file
@@ -0,0 +1,9 @@
|
||||
# Do not edit this file. Copy it to /opt/so/saltstack/local/salt/logstash/ and make changes there. It should be formatted as a list.
|
||||
# logstash:
|
||||
# dmz_nodes:
|
||||
# - mydmznodehostname1
|
||||
# - mydmznodehostname2
|
||||
# - mydmznodehostname3
|
||||
|
||||
logstash:
|
||||
dmz_nodes:
|
||||
Reference in New Issue
Block a user