Use global.pipeline for redis / kafka states

Signed-off-by: reyesj2 <94730068+reyesj2@users.noreply.github.com>
This commit is contained in:
reyesj2
2024-04-11 16:20:09 -04:00
parent 6b28dc72e8
commit 3955587372
7 changed files with 10 additions and 7 deletions

View File

@@ -1,2 +1,3 @@
global:
pcapengine: STENO
pipeline: REDIS

View File

@@ -37,6 +37,8 @@ global:
advanced: True
pipeline:
description: Sets which pipeline technology for events to use. Currently only Redis is fully supported. Kafka is experimental and requires a Security Onion Pro license.
regex: ^(REDIS|KAFKA)$
regexFailureMessage: You must enter either REDIS or KAFKA.
global: True
advanced: True
repo_host:

View File

@@ -4,9 +4,10 @@
# Elastic License 2.0.
{% from 'kafka/map.jinja' import KAFKAMERGED %}
{% from 'vars/globals.map.jinja' import GLOBALS %}
include:
{% if KAFKAMERGED.enabled %}
{% if GLOBALS.pipeline == "KAFKA" and KAFKAMERGED.enabled %}
- kafka.enabled
{% else %}
- kafka.disabled

View File

@@ -438,7 +438,8 @@ post_to_2.4.60() {
}
post_to_2.4.70() {
echo "Nothing to apply"
echo "Removing global.pipeline pillar configuration"
sed -i '/pipeline:/d' /opt/so/saltstack/local/pillar/global/soc_global.sls
POSTVERSION=2.4.70
}

View File

@@ -4,10 +4,10 @@
# Elastic License 2.0.
{% from 'redis/map.jinja' import REDISMERGED %}
{% from 'kafka/map.jinja' import KAFKAMERGED %}
{% from 'vars/globals.map.jinja' import GLOBALS %}
include:
{% if REDISMERGED.enabled and not KAFKAMERGED.enabled %}
{% if GLOBALS.pipeline == "REDIS" and REDISMERGED.enabled %}
- redis.enabled
{% else %}
- redis.disabled

View File

@@ -1 +0,0 @@
{% set ROLE_GLOBALS = {} %}

View File

@@ -1327,7 +1327,6 @@ create_global() {
# Continue adding other details
echo " imagerepo: '$IMAGEREPO'" >> $global_pillar_file
echo " pipeline: 'redis'" >> $global_pillar_file
echo " repo_host: '$HOSTNAME'" >> $global_pillar_file
echo " influxdb_host: '$HOSTNAME'" >> $global_pillar_file
echo " registry_host: '$HOSTNAME'" >> $global_pillar_file