prometheus-queries schema
prometheus/queries.json: the exact PromQL, step and window of every series, with how each was collected, and each optional catalog’s detection result.
Schema file: schema/json/bundle/prometheus-queries.schema.json. Generated from servtuner commit 5b46cdad0e5c.
Top level
Section titled “Top level”| Field | Type | Required | Description |
|---|---|---|---|
queries |
array of query | Yes | |
optional_catalogs |
array of optionalCatalogResult | Yes |
Definitions
Section titled “Definitions”timeWindow
Section titled “timeWindow”A UTC range query window.
| Field | Type | Required | Description |
|---|---|---|---|
start |
utcTimestamp | Yes | |
end |
utcTimestamp | Yes |
queryResult
Section titled “queryResult”collected: series returned. empty: the query ran and returned nothing. error: the query failed.
Type: "collected", "empty", "error"
| Field | Type | Required | Description |
|---|---|---|---|
catalog |
catalogName | Yes | |
name |
metricName | Yes | Series name; the raw result is prometheus/<catalog>/<name>.json. |
query |
string |
Yes | The PromQL exactly as sent. |
step_seconds |
number |
Yes | > 0 |
window |
timeWindow | Yes | |
result |
queryResult | Yes | |
may_be_empty |
boolean |
No | The catalog declares an empty result normal for this series, such as no CPU limit, no HPA or no GPU, so an empty result is not counted as missing data. |
detail |
string |
No | Required when result is error: what failed. |
catalogResult
Section titled “catalogResult”collected: detected and queried. absent: not detected on this cluster. error: detection or a query failed.
Type: "collected", "absent", "error"
optionalCatalogResult
Section titled “optionalCatalogResult”| Field | Type | Required | Description |
|---|---|---|---|
name |
catalogName | Yes | |
result |
catalogResult | Yes | |
detail |
string |
No | Required for absent and error: why. |