mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-20 07:53:06 +01:00
Kafka init
Signed-off-by: reyesj2 <94730068+reyesj2@users.noreply.github.com>
This commit is contained in:
@@ -79,6 +79,9 @@ fi
|
||||
'RECEIVER')
|
||||
so-firewall includehost receiver "$IP" --apply
|
||||
;;
|
||||
'KAFKANODE')
|
||||
so-firewall includehost kafkanode "$IP" --apply
|
||||
;;
|
||||
'DESKTOP')
|
||||
so-firewall includehost desktop "$IP" --apply
|
||||
;;
|
||||
|
||||
22
salt/manager/tools/sbin/so-kafka-clusterid
Normal file
22
salt/manager/tools/sbin/so-kafka-clusterid
Normal file
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one
|
||||
# or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at
|
||||
# https://securityonion.net/license; you may not use this file except in compliance with the
|
||||
# Elastic License 2.0.
|
||||
|
||||
local_salt_dir=/opt/so/saltstack/local
|
||||
|
||||
if [[ -f /usr/sbin/so-common ]]; then
|
||||
source /usr/sbin/so-common
|
||||
else
|
||||
source $(dirname $0)/../../../common/tools/sbin/so-common
|
||||
fi
|
||||
|
||||
if ! grep -q "^ kafka_cluster_id:" $local_salt_dir/pillar/secrets.sls; then
|
||||
kafka_cluster_id=$(get_random_value 22)
|
||||
echo ' kafka_cluster_id: '$kafka_cluster_id >> $local_salt_dir/pillar/secrets.sls
|
||||
else
|
||||
echo 'kafka_cluster_id exists'
|
||||
salt-call pillar.get secrets
|
||||
fi
|
||||
@@ -556,6 +556,10 @@ function createRECEIVER() {
|
||||
add_telegraf_to_minion
|
||||
}
|
||||
|
||||
function createKAFKANODE() {
|
||||
add_logstash_to_minion
|
||||
# add_telegraf_to_minion
|
||||
}
|
||||
|
||||
function testConnection() {
|
||||
retry 15 3 "salt '$MINION_ID' test.ping" True
|
||||
|
||||
Reference in New Issue
Block a user