USER GUIDE
CLI: events
Purpose¶
Tail normalized carrier, routable, routes, and manager events from the daemon API — the same stream hooks react to, but for operators debugging link flaps or missing scripts.
When to use it¶
- A hook did not fire and you need to see whether netevd saw the event
- You are validating filters in
/etc/netevd/netevd.yamlwhile bouncing an interface - You want a live feed during a change window instead of parsing
journalctl
How to get there¶
- Command:
netevd events - Default API:
http://127.0.0.1:9090(override with--endpoint http://<host>:9090) - Requires
api.enabled: truein/etc/netevd/netevd.yamland a runningnetevd.service
Operate from CLI¶
- Confirm the daemon and API are up:
systemctl is-active netevd
curl -sf http://127.0.0.1:9090/health | jq .
- Show the last 20 events (text table):
netevd events --tail 20
- Follow live events (like
tail -f):
netevd events -f
- Filter by interface and event type while testing a link bounce:
netevd events -f -i eth0 -t routable
- Machine-readable output for automation:
netevd events --tail 50 -o json --endpoint https://<host>:9090 --token-file ~/.netevd.token
- Cross-check hook side effects in the journal:
journalctl -u netevd -f
-
Empty / fail: API unreachable → check
api.enabled, bind address, and firewall; events list empty → confirmsystem.backendmatches the host (systemd-networkd,NetworkManager, ordhclient) and the interface is not ignored by a YAML filter. -
Success: Events appear within ~100 ms of a link or address change; filtered
-i/-tflags narrow the stream to the interface under test.
Related pages¶
Journal and replay¶
Set hooks.journal_path to keep every dispatched event in a JSONL file (mode 0600, rotated once to <path>.1). Each line is a
netevd.event.v1 object plus seq, outcome (dispatched, failed, rate-limited), duration_ms, error and
scripts (name, status, exit code, duration; never script output). failed means at least one script did not succeed:
netevd events --outcome failed lists those.
netevd explain --from-file /var/lib/netevd/events.jsonl
hooks.startup_triggers: true additionally fires link-added and address-added hooks for links that already exist when the daemon starts.