|
|
||
|---|---|---|
| docs | ||
| ops | ||
| plan | ||
| registries | ||
| scripts | ||
| src/wifi_agentd | ||
| tests | ||
| .gitignore | ||
| README.md | ||
| pyproject.toml | ||
README.md
Wi-Fi Linux Agent
Wi-Fi Linux Agent is a systemd-managed Python daemon for collecting Wi-Fi configuration parameters, statuses, and events from a Linux host, normalizing them under contract-driven rules, storing them in an intermediate cache, and dispatching them to external collectors.
What the agent does
The agent collects data from these source families:
- configuration files;
wpa_supplicantD-Bus;- systemd journal (
wpa_supplicantand other configured processes).
It classifies collected data into three canonical families:
- configuration snapshots;
- status snapshots;
- event notifications.
After collection the agent:
- normalizes source payloads into canonical records;
- validates them against per-source data contracts;
- stores validated records in an intermediate cache with TTL;
- assigns each record to a delivery queue;
- sends queued records to either webhook targets or
zabbix_sender.
Core capabilities
- source registry with connection, heartbeat, and enable/disable parameters;
- data registry with collection mode, TTL, queue selection, collect/skip behavior, and validation rules;
- immediate queue and four batch queues with different dispatch intervals;
systemddaemon runtime;- CLI utility for O&M tasks:
- inspect agent state;
- inspect sources;
- inspect queues;
- reset queue counters;
- inspect cache;
- purge cache;
- tail normalized events.
- monitor live source, cache, and queue streams.
- replay source records into cache with
monitor ingest. - filter monitor streams by source and queue for loss analysis.
- Linux smoke-run helper for validating the journal and D-Bus paths from a checkout or an installed environment.
- shared deployment environment file at
/etc/wifi-agentd/.envfor both daemon and CLI.
Current implementation assumptions
- Python version:
>= 3.12.4 - v1 persistence: SQLite
- v1 runtime mode: single-host daemon under
systemd - operator-facing runtime configuration is loaded from
/etc/wifi-agentd/.env - Wi-Fi event filtering uses
WIFI_AGENT_WIFI_INTERFACEfrom the shared.env - D-Bus integration is backed by
dbus-nextand degrades gracefully if the bus or import is unavailable - journal event collection uses
journalctlwhen available - checkout-local smoke helper:
scripts/smoke_linux.py
Main concepts
Source registry
Defines the technical description of each source:
- source id;
- source type;
- connection parameters;
- heartbeat / keepalive settings;
- enabled / disabled flag.
Data registry
Defines what data is collected and how it is handled:
- contract id;
- source binding;
- record family;
- collection mode (
push/poll); - TTL in cache;
- queue mode and queue name;
- target type;
- collect / skip behavior;
- validation rules.
Queues
Two queue classes are supported:
- immediate dispatch;
- batched dispatch.
The default queue set is:
q.immediateq.batch.15sq.batch.60sq.batch.300sq.batch.900s
Each queue is bound to one delivery target configuration.
Repository layout
wifi-agentd/
README.md
pyproject.toml
docs/
deployment.md
usage.md
ops/
env/
systemd/
dbus/
src/wifi_agentd/
registries/
tests/
scripts/
Documentation
- Deployment guide:
docs/deployment.md - Usage and O&M guide:
docs/usage.md - Planning and Codex prompt-pack:
plan/wifi_agentd_plan_prompt_pack.md
Delivery scope of v1
Included:
- config file collection;
- WPA D-Bus status/event adapter backed by
dbus-next; - journal event adapter backed by
journalctl; - cached delivery to webhook and
zabbix_sender; - persistent queue delivery counters for
delivered,dropped, andexpired; - CLI and
systemdservice integration.
Not included in the first functional increment:
- clustering;
- external message broker;
- GUI;
- active remediation;
- autonomous ML/LLM behavior;
- full D-Bus configuration collection implementation beyond the stub.
Current status
The repository now contains a runnable baseline with:
- typed settings loading;
- registry loading and validation;
- SQLite-backed cache and queue tables;
- persistent queue delivery counters and reset support;
- config-file collection;
- D-Bus status/event collection backed by
dbus-next; - journal event collection via
journalctl; - webhook and
zabbix_senderdelivery adapters; - Typer-based CLI;
systemdunit file.