mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Only load pipelines on change
This commit is contained in:
@@ -268,6 +268,15 @@ es_repo_dir:
|
|||||||
- require:
|
- require:
|
||||||
- file: nsmesdir
|
- file: nsmesdir
|
||||||
|
|
||||||
|
so-pipelines-reload:
|
||||||
|
cmd.run:
|
||||||
|
- name: rm -r /opt/so/state/espipelines.txt
|
||||||
|
- onchanges:
|
||||||
|
- file: esingestconf
|
||||||
|
- file: esingestdynamicconf
|
||||||
|
- file: esyml
|
||||||
|
- file: so-elasticsearch-pipelines-script
|
||||||
|
|
||||||
auth_users:
|
auth_users:
|
||||||
file.managed:
|
file.managed:
|
||||||
- name: /opt/so/conf/elasticsearch/users.tmp
|
- name: /opt/so/conf/elasticsearch/users.tmp
|
||||||
@@ -397,11 +406,6 @@ so-elasticsearch-templates:
|
|||||||
so-elasticsearch-pipelines:
|
so-elasticsearch-pipelines:
|
||||||
cmd.run:
|
cmd.run:
|
||||||
- name: /usr/sbin/so-elasticsearch-pipelines {{ grains.host }}
|
- name: /usr/sbin/so-elasticsearch-pipelines {{ grains.host }}
|
||||||
- onchanges:
|
|
||||||
- file: esingestconf
|
|
||||||
- file: esingestdynamicconf
|
|
||||||
- file: esyml
|
|
||||||
- file: so-elasticsearch-pipelines-script
|
|
||||||
- require:
|
- require:
|
||||||
- docker_container: so-elasticsearch
|
- docker_container: so-elasticsearch
|
||||||
- file: so-elasticsearch-pipelines-script
|
- file: so-elasticsearch-pipelines-script
|
||||||
|
|||||||
@@ -23,6 +23,9 @@ ELASTICSEARCH_PORT=9200
|
|||||||
ELASTICSEARCH_INGEST_PIPELINES="/opt/so/conf/elasticsearch/ingest/"
|
ELASTICSEARCH_INGEST_PIPELINES="/opt/so/conf/elasticsearch/ingest/"
|
||||||
|
|
||||||
# Wait for ElasticSearch to initialize
|
# Wait for ElasticSearch to initialize
|
||||||
|
|
||||||
|
if [ ! -f /opt/so/state/espipelines.txt ]; then
|
||||||
|
|
||||||
echo -n "Waiting for ElasticSearch..."
|
echo -n "Waiting for ElasticSearch..."
|
||||||
COUNT=0
|
COUNT=0
|
||||||
ELASTICSEARCH_CONNECTED="no"
|
ELASTICSEARCH_CONNECTED="no"
|
||||||
@@ -51,5 +54,9 @@ for i in *; do echo $i; RESPONSE=$({{ ELASTICCURL }} -k -XPUT -L https://${ELAST
|
|||||||
echo
|
echo
|
||||||
|
|
||||||
cd - >/dev/null
|
cd - >/dev/null
|
||||||
|
if [[ "$RETURN_CODE" != "1" ]]; then
|
||||||
|
touch /opt/so/state/espipelines.txt
|
||||||
|
fi
|
||||||
|
else
|
||||||
exit $RETURN_CODE
|
exit $RETURN_CODE
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user