Skip to content

Alert on a sensor that stops logging: absence rules for Suricata and Zeek #441

Description

@Gerrrt

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

  • SuricataLogsStoppedabsent_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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestseq/1Step 1 within its milestone; same number = can run in parallel

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions