Counts monitors by one or more fields. No monitors are returned. Each
entry in attributes is a field to group by, and the response carries one
block per entry: that field's distinct-value count, and its most frequent
values with a count each. Grouping by health answers "how many monitors
are in each health state".
Fields are the ones GET /v1/monitors lists under filter, written the
same way. An entry may also be a CEL expression over them, for buckets no
single field provides: aiTriagingMode == "Triage" gives "true" and
"false" rather than one bucket per stored mode. The expression must yield
one scalar per monitor — that value becomes the bucket key — so a list or
object is rejected with 400.
Keys come back as JSON strings whatever the field's type: numbers as
decimal digits, bools as "true" or "false", timestamps as RFC 3339.
meta reports totalMonitors (before the filter) and filteredMonitors
(after).
For example, facet counts for the list's Health and Type columns:
GET /v1/monitors/stats?attributes=health,ruleKind&topK=10
The AI column's two buckets, over enabled monitors only. Both values hold
quotes, so both are CSV-escaped — inner " doubled, the item wrapped —
then URL-encoded:
GET /v1/monitors/stats
?attributes="aiTriagingMode == ""Triage"""
&filter=disabled == false| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||