mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-19 15:33:06 +01:00
Add logstash
This commit is contained in:
@@ -119,6 +119,25 @@ function add_elastic_to_minion() {
|
||||
" " >> $PILLARFILE
|
||||
}
|
||||
|
||||
# Add Elastic Fleet Server settings to the minion file
|
||||
function add_fleet_to_minion() {
|
||||
|
||||
# Create ES Token for Fleet server (Curl to Kibana API)
|
||||
# TODO: Add error handling
|
||||
ESTOKEN=$(curl -K /opt/so/conf/elasticsearch/curl.config -L -X POST "localhost:5601/api/fleet/service_tokens" -H 'kbn-xsrf: true' -H 'Content-Type: application/json' | jq -r .value)
|
||||
|
||||
# Create Logstash Certs
|
||||
|
||||
|
||||
# Write out settings to minion file
|
||||
printf '%s\n'\
|
||||
"logstash_settings:"\
|
||||
" lsheap: '500m'"\
|
||||
"fleet-server:"\
|
||||
" ES-Token: '$ESTOKEN'"\
|
||||
" " >> $PILLARFILE
|
||||
}
|
||||
|
||||
# Analyst Workstation
|
||||
function add_analyst_to_minion() {
|
||||
printf '%s\n'\
|
||||
@@ -170,6 +189,10 @@ function createEVAL() {
|
||||
add_sensor_to_minion
|
||||
}
|
||||
|
||||
function createFLEET() {
|
||||
add_fleet_to_minion
|
||||
}
|
||||
|
||||
function createIDHNODE() {
|
||||
echo "Nothing custom needed for IDH nodes"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user