mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2026-09-30 03:27:18 +02:00
Merge pull request #16242 from Security-Onion-Solutions/zeekrestart
stop Zeek gracefully preventing post-terminate logs
This commit is contained in:
@@ -18,6 +18,7 @@ zeek:
|
|||||||
StatsLogEnable: 0
|
StatsLogEnable: 0
|
||||||
StatsLogExpireInterval: 0
|
StatsLogExpireInterval: 0
|
||||||
StatusCmdShowAll: 0
|
StatusCmdShowAll: 0
|
||||||
|
StopWait: 1
|
||||||
CrashExpireInterval: 0
|
CrashExpireInterval: 0
|
||||||
SitePolicyScripts: local.zeek
|
SitePolicyScripts: local.zeek
|
||||||
LogDir: /nsm/zeek/logs
|
LogDir: /nsm/zeek/logs
|
||||||
|
|||||||
@@ -9,9 +9,19 @@
|
|||||||
include:
|
include:
|
||||||
- zeek.sostatus
|
- zeek.sostatus
|
||||||
|
|
||||||
|
# Stop first so the entrypoint's SIGTERM trap can archive the final logs; docker_container.absent
|
||||||
|
# with force is a 'docker rm -f', which never delivers SIGTERM. force stays so the state still
|
||||||
|
# converges if the stop overruns.
|
||||||
|
so-zeek_stopped:
|
||||||
|
docker_container.stopped:
|
||||||
|
- name: so-zeek
|
||||||
|
- error_on_absent: False
|
||||||
|
|
||||||
so-zeek:
|
so-zeek:
|
||||||
docker_container.absent:
|
docker_container.absent:
|
||||||
- force: True
|
- force: True
|
||||||
|
- require:
|
||||||
|
- docker_container: so-zeek_stopped
|
||||||
|
|
||||||
so-zeek_so-status.disabled:
|
so-zeek_so-status.disabled:
|
||||||
file.comment:
|
file.comment:
|
||||||
|
|||||||
@@ -19,6 +19,10 @@ so-zeek:
|
|||||||
- restart_policy: unless-stopped
|
- restart_policy: unless-stopped
|
||||||
- start: True
|
- start: True
|
||||||
- privileged: True
|
- privileged: True
|
||||||
|
# Docker's default 10s grace is not enough for the entrypoint's SIGTERM trap to run
|
||||||
|
# 'zeekctl stop' and let StopWait archive the final logs. Overrunning it means SIGKILL,
|
||||||
|
# which strands those logs in spool/tmp and marks every node crashed on the next start.
|
||||||
|
- stop_timeout: 180
|
||||||
{% if DOCKERMERGED.containers['so-zeek'].ulimits %}
|
{% if DOCKERMERGED.containers['so-zeek'].ulimits %}
|
||||||
- ulimits:
|
- ulimits:
|
||||||
{% for ULIMIT in DOCKERMERGED.containers['so-zeek'].ulimits %}
|
{% for ULIMIT in DOCKERMERGED.containers['so-zeek'].ulimits %}
|
||||||
|
|||||||
@@ -99,6 +99,18 @@ zeek:
|
|||||||
regexFailureMessage: You must enter a whole number of days, or 0 to keep crash directories forever.
|
regexFailureMessage: You must enter a whole number of days, or 0 to keep crash directories forever.
|
||||||
helpLink: zeek
|
helpLink: zeek
|
||||||
advanced: True
|
advanced: True
|
||||||
|
StopWait:
|
||||||
|
description: >-
|
||||||
|
Set to 1 to make "zeekctl stop" wait for the final logs to be archived instead of
|
||||||
|
letting that finish in the background. Security Onion stops Zeek by stopping its
|
||||||
|
container, so anything still running in the background is killed when the container
|
||||||
|
exits - without this, the last logs of each run are stranded unarchived in
|
||||||
|
/nsm/zeek/spool/tmp and never reach Elasticsearch. It is read only for that reason.
|
||||||
|
regex: ^[01]$
|
||||||
|
regexFailureMessage: You must enter 0 or 1.
|
||||||
|
helpLink: zeek
|
||||||
|
advanced: True
|
||||||
|
readonly: True
|
||||||
MinDiskSpace:
|
MinDiskSpace:
|
||||||
description: >-
|
description: >-
|
||||||
Percentage of free disk space below which ZeekControl reports a warning, or 0 to disable the check
|
Percentage of free disk space below which ZeekControl reports a warning, or 0 to disable the check
|
||||||
|
|||||||
Reference in New Issue
Block a user