mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
This commit is contained in:
@@ -5,23 +5,7 @@
|
||||
{%- set FLEET = salt['pillar.get']('static:fleet_ip', '') %}
|
||||
{%- set KRATOS = salt['pillar.get']('kratos:redirect', '') %}
|
||||
|
||||
|
||||
KIBANA_VERSION="7.6.1"
|
||||
MAX_WAIT=120
|
||||
|
||||
# Check to see if Kibana is available
|
||||
until curl "{{ MASTER }}:5601/nonexistenturl" 2>&1 |grep -q "Not Found" ; do
|
||||
wait_step=$(( ${wait_step} + 1 ))
|
||||
echo "Waiting on Kibana ({{ MASTER }}:5601)...Attempt #$wait_step"
|
||||
if [ ${wait_step} -gt ${MAX_WAIT} ]; then
|
||||
echo "ERROR: Kibana not available for more than ${MAX_WAIT} seconds."
|
||||
exit 5
|
||||
fi
|
||||
sleep 1s;
|
||||
done
|
||||
|
||||
# Sleep additional JIC server is not ready
|
||||
sleep 30s
|
||||
|
||||
# Copy template file
|
||||
cp /opt/so/conf/kibana/saved_objects.ndjson.template /opt/so/conf/kibana/saved_objects.ndjson
|
||||
|
||||
@@ -66,13 +66,6 @@ kibanabin:
|
||||
- mode: 755
|
||||
- template: jinja
|
||||
|
||||
kibanadashtemplate:
|
||||
file.managed:
|
||||
- name: /opt/so/conf/kibana/saved_objects.ndjson.template
|
||||
- source: salt://kibana/files/saved_objects.ndjson
|
||||
- user: 932
|
||||
- group: 939
|
||||
|
||||
# Start the kibana docker
|
||||
so-kibana:
|
||||
docker_container.running:
|
||||
@@ -91,12 +84,29 @@ so-kibana:
|
||||
- port_bindings:
|
||||
- 0.0.0.0:5601:5601
|
||||
|
||||
kibanadashtemplate:
|
||||
file.managed:
|
||||
- name: /opt/so/conf/kibana/saved_objects.ndjson.template
|
||||
- source: salt://kibana/files/saved_objects.ndjson
|
||||
- user: 932
|
||||
- group: 939
|
||||
|
||||
wait_for_kibana:
|
||||
module.run:
|
||||
- http.wait_for_successful_query:
|
||||
- url: "http://{{MASTER}}:5601/api/saved_objects/_find?type=config"
|
||||
- wait_for: 180
|
||||
- onchanges:
|
||||
- file: kibanadashtemplate
|
||||
|
||||
so-kibana-config-load:
|
||||
cmd.run:
|
||||
- name: /usr/sbin/so-kibana-config-load
|
||||
- cwd: /opt/so
|
||||
- onchanges:
|
||||
- file: kibanadashtemplate
|
||||
- wait_for_kibana
|
||||
- require:
|
||||
- wait_for_kibana
|
||||
|
||||
|
||||
# Keep the setting correct
|
||||
|
||||
Reference in New Issue
Block a user