SuricataStopped reads the firewall's process table over SNMP, and
docs/security.md is careful about what that buys: "It proves the process is
alive, not that it is inspecting anything."
There is a gap under that sentence. A Suricata that is running but has stopped
emitting — bound to the wrong interface, a hung capture thread, a rule reload
that produced an empty set — reads identically to a healthy one from SNMP, and
no Loki rule watches for its silence either.
The estate already has this shape solved twice, in FirewallLogsStopped and
DhcpLeaseLogsStopped, both absent_over_time on the same syslog pipe. The IDS
stream is the one that was missed.
What to add
SuricataLogsStopped — absent_over_time({app="suricata"}[<window>]). This
half can land now, independently of anything else.
ZeekLogsStopped — the same shape against the lab's Loki, once
#437 exists.
The window needs measuring, not choosing
Suricata on a quiet segment is legitimately silent for long stretches — Skids and
Degens are terminal, and a quiet night is normal. Thirty minutes is a starting
guess, and the honest way to set it is to read the actual inter-alert gap over
the retention already in Loki before committing to a number.
Otherwise this becomes an alert that fires at 3 a.m. because nobody was
browsing, and gets muted within a week — which is the outcome
#166 wrote down and designed
around.
What this can and cannot prove
Unit tests for both, per the standing rule that a stack with rules and no
promtool tests is a CI failure. But Loki rules still have no unit-test harness
— #234 records this — so these
are proven to parse and evaluate, not to fire. Worth saying in the PR rather
than implying otherwise.
Purchases this needs
None.
SuricataStoppedreads the firewall's process table over SNMP, anddocs/security.mdis careful about what that buys: "It proves the process isalive, not that it is inspecting anything."
There is a gap under that sentence. A Suricata that is running but has stopped
emitting — bound to the wrong interface, a hung capture thread, a rule reload
that produced an empty set — reads identically to a healthy one from SNMP, and
no Loki rule watches for its silence either.
The estate already has this shape solved twice, in
FirewallLogsStoppedandDhcpLeaseLogsStopped, bothabsent_over_timeon the same syslog pipe. The IDSstream is the one that was missed.
What to add
SuricataLogsStopped—absent_over_time({app="suricata"}[<window>]). Thishalf can land now, independently of anything else.
ZeekLogsStopped— the same shape against the lab's Loki, once#437 exists.
The window needs measuring, not choosing
Suricata on a quiet segment is legitimately silent for long stretches — Skids and
Degens are terminal, and a quiet night is normal. Thirty minutes is a starting
guess, and the honest way to set it is to read the actual inter-alert gap over
the retention already in Loki before committing to a number.
Otherwise this becomes an alert that fires at 3 a.m. because nobody was
browsing, and gets muted within a week — which is the outcome
#166 wrote down and designed
around.
What this can and cannot prove
Unit tests for both, per the standing rule that a stack with rules and no
promtooltests is a CI failure. But Loki rules still have no unit-test harness— #234 records this — so these
are proven to parse and evaluate, not to fire. Worth saying in the PR rather
than implying otherwise.
Purchases this needs
None.