mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-15 05:32:49 +01:00
21 lines
787 B
Bash
21 lines
787 B
Bash
#!/bin/bash
|
|
# {%- set FLEET_MASTER = salt['pillar.get']('static:fleet_master', False) -%}
|
|
# {%- set FLEET_NODE = salt['pillar.get']('static:fleet_node', False) -%}
|
|
# {%- set MASTER = salt['pillar.get']('master:url_base', '') %}
|
|
|
|
KIBANA_VERSION="7.6.1"
|
|
|
|
# Copy template file
|
|
cp /opt/so/conf/kibana/saved_objects.ndjson.template /opt/so/conf/kibana/saved_objects.ndjson
|
|
|
|
# {% if FLEET_NODE or FLEET_MASTER %}
|
|
# Fleet IP
|
|
sed -i "s/FLEETPLACEHOLDER/{{ MASTER }}/g" /opt/so/conf/kibana/saved_objects.ndjson
|
|
# {% endif %}
|
|
|
|
# SOCtopus and Master
|
|
sed -i "s/PLACEHOLDER/{{ MASTER }}/g" /opt/so/conf/kibana/saved_objects.ndjson
|
|
|
|
# Load saved objects
|
|
curl -X POST "localhost:5601/api/saved_objects/_import" -H "kbn-xsrf: true" --form file=@/opt/so/conf/kibana/saved_objects.ndjson > /dev/null 2>&1
|