Metrics¶
No metric has a per-device label: 10,000 devices would explode cardinality.
Per-device state is in the API (GET /v1/devices/{id}).
Agent (fleetwire_agent_*, also exported by the load generator)¶
Metric |
Type |
Labels |
Meaning |
|---|---|---|---|
|
counter |
collector |
readings written to the local log |
|
counter |
collector |
failures, timeouts, invalid readings |
|
counter |
reason ( |
readings dropped by the disk budget (reported as gaps) |
|
counter |
readings that could not be written |
|
|
gauge |
size of the local log |
|
|
counter |
published, resends included |
|
|
counter |
publishes that failed or timed out |
|
|
counter |
seqs newly covered by end-to-end acks |
|
|
gauge |
written but not yet acked |
|
|
counter |
go-back-N restarts after an ack timeout |
|
|
counter |
server ack ahead of the device’s next seq; the agent moves its seq forward so no seq is reused |
|
|
counter |
result ( |
certificate renewal attempts |
|
the connection to the broker: see MQTT connections |
Bridge (fleetwire_bridge_*)¶
Metric |
Type |
Labels |
Meaning |
|---|---|---|---|
|
counter |
result ( |
|
|
gauge |
received, not yet confirmed by Kafka, including messages whose write is being retried |
|
|
histogram |
MQTT receive to Kafka confirmation |
|
|
gauge |
Unix time of the last confirmed Kafka write; the process start time until the first one |
|
|
the shared subscription’s connection: see MQTT connections |
Ingest (fleetwire_ingest_*)¶
Metric |
Type |
Labels |
Meaning |
|---|---|---|---|
|
counter |
result ( |
batches processed |
|
counter |
readings stored for the first time |
|
|
counter |
seqs recorded as device-reported gaps |
|
|
histogram (0.1 to 60 s, fine between 1 and 5 s) |
collection (device clock) to commit |
|
|
histogram |
one batch transaction |
|
|
gauge |
partition |
records between the committed offset and the log end, for the partitions this instance owns (every 10 s) |
|
counter |
batch transactions retried |
|
|
counter |
batches whose chunk or gap overlapped stored data; must stay 0 |
|
|
histogram |
abs(bridge receive time - device send time) |
|
|
counter |
readings timestamped in the future |
|
|
counter |
end-to-end acks published |
|
|
counter |
ack publishes that failed (they are retried) |
|
|
gauge |
devices with an ack not yet published |
|
|
the ack publisher’s connection: see MQTT connections |
API (fleetwire_api_*, fleetwire_jobs_*, fleetwire_crl_*)¶
Metric |
Type |
Labels |
|---|---|---|
|
counter |
listener, route, code |
|
histogram |
listener, route |
|
counter |
outcome ( |
|
counter |
kind ( |
|
gauge |
|
|
gauge |
fleetwire_api_enroll_refusals_total counts every refused enrollment. The
audit log keeps one entry every 10 minutes per token, or per client network
for tokens that match nothing, so a flood of bad tokens cannot fill it.
fleetwire_crl_age_seconds is the time since this process last published
the CRL. Until its first publish it reports about 9.2e9 (the largest
duration Go can hold), which the CRL alerts treat as “not published since
start”.
MQTT connections¶
The agent, the bridge and ingest’s ack publisher export the same four
metrics for their connection to Mosquitto, each under its own prefix:
fleetwire_agent_mqtt_*, fleetwire_bridge_mqtt_* and
fleetwire_ingest_mqtt_*. In the load generator they add up over all its
devices.
Metric |
Type |
Labels |
Meaning |
|---|---|---|---|
|
counter |
successful connections |
|
|
counter |
failed connection attempts |
|
|
counter |
connections lost |
|
|
gauge |
connections up now: 0 or 1 per process, one per connected device in the load generator |
Load generator (fleetwire_loadgen_*)¶
Served with fleetwire-loadgen -metrics-listen, next to the agent and
fleetwire_agent_mqtt_* metrics of its devices.
Metric |
Type |
Labels |
Meaning |
|---|---|---|---|
|
gauge |
device instances running now |
|
|
counter |
device instances started |
|
|
counter |
device instances that could not be opened or given an enrollment token, and never ran |
|
|
counter |
device instances that ran and stopped with an error |
Every binary also exports Go runtime and process metrics and
fleetwire_build_info{service,version,commit}. The agent snap leaves out
process_network_receive_bytes_total and
process_network_transmit_bytes_total: they come from
/proc/<pid>/net/netstat, which the snap’s AppArmor profile does not
allow it to read.