mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Move background jobs to cron
This commit is contained in:
@@ -83,7 +83,7 @@ soc:
|
|||||||
bucket: telegraf
|
bucket: telegraf
|
||||||
verifyCert: false
|
verifyCert: false
|
||||||
salt:
|
salt:
|
||||||
saltPipe: /opt/sensoroni/salt.pipe
|
saltPipe: /opt/sensoroni/salt/pipe
|
||||||
sostatus:
|
sostatus:
|
||||||
refreshIntervalMs: 30000
|
refreshIntervalMs: 30000
|
||||||
offlineThresholdMs: 900000
|
offlineThresholdMs: 900000
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
PIPE_OWNER=${PIPE_OWNER:-socore}
|
PIPE_OWNER=${PIPE_OWNER:-socore}
|
||||||
PIPE_GROUP=${PIPE_GROUP:-socore}
|
PIPE_GROUP=${PIPE_GROUP:-socore}
|
||||||
SOC_PIPE=${SOC_PIPE_REQUEST:-/opt/so/conf/soc/salt.pipe}
|
SOC_PIPE=${SOC_PIPE_REQUEST:-/opt/so/conf/soc/salt/pipe}
|
||||||
|
|
||||||
function log() {
|
function log() {
|
||||||
echo "$(date) | $1"
|
echo "$(date) | $1"
|
||||||
|
|||||||
@@ -27,6 +27,12 @@ soclogdir:
|
|||||||
- group: 939
|
- group: 939
|
||||||
- makedirs: True
|
- makedirs: True
|
||||||
|
|
||||||
|
socsaltdir:
|
||||||
|
file.directory:
|
||||||
|
- name: /opt/so/conf/soc/salt
|
||||||
|
- user: 939
|
||||||
|
- group: 939
|
||||||
|
- makedirs: True
|
||||||
|
|
||||||
socconfig:
|
socconfig:
|
||||||
file.managed:
|
file.managed:
|
||||||
@@ -80,7 +86,9 @@ socusersroles:
|
|||||||
- require:
|
- require:
|
||||||
- sls: manager.sync_es_users
|
- sls: manager.sync_es_users
|
||||||
|
|
||||||
|
salt-relay:
|
||||||
|
cron.present:
|
||||||
|
- name: 'ps -ef | grep salt-relay | grep -v grep || /opt/so/saltstack/default/salt/soc/files/bin/salt-relay.sh >> /opt/so/log/soc/salt-relay.log 2>&1 &'
|
||||||
|
|
||||||
so-soc:
|
so-soc:
|
||||||
docker_container.running:
|
docker_container.running:
|
||||||
@@ -96,7 +104,7 @@ so-soc:
|
|||||||
- /opt/so/conf/soc/custom.js:/opt/sensoroni/html/js/custom.js:ro
|
- /opt/so/conf/soc/custom.js:/opt/sensoroni/html/js/custom.js:ro
|
||||||
- /opt/so/conf/soc/custom_roles:/opt/sensoroni/rbac/custom_roles:ro
|
- /opt/so/conf/soc/custom_roles:/opt/sensoroni/rbac/custom_roles:ro
|
||||||
- /opt/so/conf/soc/soc_users_roles:/opt/sensoroni/rbac/users_roles:rw
|
- /opt/so/conf/soc/soc_users_roles:/opt/sensoroni/rbac/users_roles:rw
|
||||||
- /opt/so/conf/soc/salt.pipe:/opt/sensoroni/salt.pipe:rw
|
- /opt/so/conf/soc/salt:/opt/sensoroni/salt:rw
|
||||||
- /opt/so/saltstack:/opt/so/saltstack:rw
|
- /opt/so/saltstack:/opt/so/saltstack:rw
|
||||||
{%- if salt['pillar.get']('nodestab', {}) %}
|
{%- if salt['pillar.get']('nodestab', {}) %}
|
||||||
- extra_hosts:
|
- extra_hosts:
|
||||||
|
|||||||
@@ -134,6 +134,11 @@ filecheck_script:
|
|||||||
- group: 939
|
- group: 939
|
||||||
- mode: 755
|
- mode: 755
|
||||||
|
|
||||||
|
filecheck_run:
|
||||||
|
cron.present:
|
||||||
|
- name: 'ps -ef | grep filecheck | grep -v grep || python3 /opt/so/conf/strelka/filecheck >> /opt/so/log/strelka/filecheck_stdout.log 2>&1 &'
|
||||||
|
- user: socore
|
||||||
|
- minute: 9
|
||||||
|
|
||||||
filcheck_history_clean:
|
filcheck_history_clean:
|
||||||
cron.present:
|
cron.present:
|
||||||
|
|||||||
Reference in New Issue
Block a user