From 7f3f99880f4e8aad6cf2bd333e3b688569e4776e Mon Sep 17 00:00:00 2001 From: Josh Patterson Date: Fri, 14 Aug 2026 15:58:04 -0400 Subject: [PATCH] Disable the Zeek stats log "zeekctl cron" writes node statistics to /nsm/zeek/logs/stats. The CPU and memory half comes from a helper that shells out to top, which the Zeek container does not include. The helper's "command not found" output is then parsed as process data, so every cron run appended a line per node reading "bad output from top", which so-log-check reports. Nothing wrote that file before, since log_stats and update_http_stats only run from "zeekctl cron". Set StatsLogEnable to 0 so neither runs, and mark it read only since the CPU and memory statistics cannot work with this image. The interface counters it also collects are not used anywhere in Security Onion, which tracks Zeek packet loss separately through packetloss.log and Telegraf, so nothing is lost by turning this off. Note in StatsLogExpireInterval that it does nothing while the stats log is off. --- salt/zeek/defaults.yaml | 2 +- salt/zeek/soc_zeek.yaml | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/salt/zeek/defaults.yaml b/salt/zeek/defaults.yaml index c87dfeec5..c68339584 100644 --- a/salt/zeek/defaults.yaml +++ b/salt/zeek/defaults.yaml @@ -15,7 +15,7 @@ zeek: MailHostUpDown: 0 LogRotationInterval: 3600 LogExpireInterval: 0 - StatsLogEnable: 1 + StatsLogEnable: 0 StatsLogExpireInterval: 0 StatusCmdShowAll: 0 CrashExpireInterval: 0 diff --git a/salt/zeek/soc_zeek.yaml b/salt/zeek/soc_zeek.yaml index 52934b044..1a12f7f5f 100644 --- a/salt/zeek/soc_zeek.yaml +++ b/salt/zeek/soc_zeek.yaml @@ -69,10 +69,24 @@ zeek: regexFailureMessage: Enter 0, or a positive number optionally followed by "day" or "hr" (for example 7, "7 days", or "12 hr"). Minutes are not accepted because a log expire interval shorter than the log rotation interval prevents Zeek from starting. helpLink: zeek advanced: True + StatsLogEnable: + description: >- + Set to 1 to have "zeekctl cron" write node statistics to /nsm/zeek/logs/stats. This is + disabled because the CPU and memory portion depends on the "top" command, which the Zeek + container does not include, so every run records an error for each node instead. The + interface packet counters it also collects are not used anywhere in Security Onion, which + tracks Zeek packet loss separately through packetloss.log and Telegraf. It is read only + for that reason. + regex: ^[01]$ + regexFailureMessage: You must enter 0 or 1. + helpLink: zeek + advanced: True + readonly: True StatsLogExpireInterval: description: >- Number of days to keep entries in the Zeek stats log, or 0 to keep them forever. - Applied by "zeekctl cron", which runs every 5 minutes. + Applied by "zeekctl cron", which runs every 5 minutes. This has no effect unless + StatsLogEnable is turned on, which it is not by default. regex: ^[0-9]+$ regexFailureMessage: You must enter a whole number of days, or 0 to keep entries forever. helpLink: zeek