network_health_score
Calculate a composite fleet health score (0-100) per network by combining device online percentage, uplink health, and alert severity penalty. Ranks networks worst-first with explainable components.
Instructions
[READ] Composite fleet health score per network (0-100), worst-first.
Folds device online %%, uplink health %%, and an alert-severity penalty into
one weighted score per network (0.5 / 0.3 / 0.2), every component returned so
the number is explainable. Pure analysis over injected rows — no live pull.
Args:
device_statuses: rows {serial, networkId, status, productType} (e.g. from
org_device_statuses' 'devices').
uplinks: optional rows {networkId, status} (active/ready = healthy).
alerts: optional rows {networkId, severity} (critical/warning/info).
limit: Max rows in the ranked list (default 100). The result carries
'returned'/'limit'/'truncated'; re-run with a higher limit when
'truncated' is true rather than treating the list as complete.
Returns dict: {networksEvaluated, fleetScore, summary:{healthy, degraded,
critical}, weights, worst:[{networkId, score, band, devicesOnline,
devicesTotal, onlinePct, uplinkHealthPct, alertPenalty}], returned,
limit, truncated, note}.
Example: network_health_score(device_statuses=[
{"networkId":"N1","status":"online"},
{"networkId":"N1","status":"offline"}]).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| alerts | No | ||
| uplinks | No | ||
| device_statuses | Yes |