mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
update Kibana config
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
{%- set MASTER = salt['pillar.get']('static:masterip', '') %}
|
||||
#!/bin/bash
|
||||
KIBANA_VERSION="7.6.1"
|
||||
MAX_WAIT=60
|
||||
|
||||
# Check to see if Kibana is available
|
||||
wait_step=0
|
||||
until curl -s -XGET http://localhost:5601 > /dev/null ; do
|
||||
until curl "{{ MASTER }}:5601/nonexistenturl" 2>&1 |grep -q "Not Found" ; do
|
||||
wait_step=$(( ${wait_step} + 1 ))
|
||||
echo "Waiting on Kibana...Attempt #$wait_step"
|
||||
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
|
||||
@@ -30,5 +30,10 @@ curl -X PUT "localhost:5601/api/saved_objects/config/$KIBANA_VERSION" -H 'kbn-xs
|
||||
}
|
||||
}'
|
||||
|
||||
# Sub our IP for placholders
|
||||
for i in FLEETPLACEHOLDER PCAPPLACEHOLDER SOCTOPUSPLACEHOLDER; do
|
||||
sed -i "s/$i/{{ MASTER }}/" /opt/so/saltstack/salt/kibana/saved_objects.ndjson
|
||||
done
|
||||
|
||||
# Load saved objects
|
||||
curl -X POST "localhost:5601/api/saved_objects/_import" -H "kbn-xsrf: true" --form file=@/opt/so/saltstack/salt/kibana/saved_objects.ndjson
|
||||
|
||||
@@ -84,6 +84,7 @@ so-kibana-config-load:
|
||||
- shell: /bin/bash
|
||||
- runas: socore
|
||||
- source: salt://kibana/bin/so-kibana-config-load
|
||||
- template: jinja
|
||||
|
||||
# Keep the setting correct
|
||||
#KibanaHappy:
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user