watch
watch
¶
shield watch — stream blocked-access events as JSON lines.
Tails the dnsmasq query log, per-container audit log, and (optionally) the NFLOG netlink socket. Only works when the dnsmasq DNS tier is active. Clean exit on SIGINT or SIGTERM.
run_watch(state_dir, container)
¶
Stream blocked-access events as JSON lines to stdout.
Only meaningful under the dnsmasq tier — the query log and nftset
integration that feed the watchers do not exist in the dig/getent
tiers. Uses select so a single thread can multiplex the DNS
log, audit log, and NFLOG socket without blocking on any one source.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
state_dir
|
Path
|
Per-container state directory. |
required |
container
|
str
|
Container name (for event metadata). |
required |
Raises:
| Type | Description |
|---|---|
SystemExit
|
If the DNS tier is not dnsmasq. |