Application health
Graph health scores are calculated indicators based on application service-level agreements (SLAs) and key performance indicators (KPIs). They differ from the configured origin health check: the demo probes /health every ten seconds with a three-second timeout, one healthy result to become healthy, and two unhealthy results to become unhealthy.
A graph score is not that threshold, a count of passing probes, or proof that every route succeeded. Read its returned timestamp and compare it with HTTP access logs and origin performance.
Query scope
Section titled “Query scope”Query XCSH_NAMESPACE and the discovered XCSH_VIRTUAL_HOST over the fixed two-hour XCSH_START_TIME–XCSH_END_TIME window, grouped by VHOST with five-minute buckets.
Request procedure
Section titled “Request procedure”-
Request the graph score types.
Terminal window XCSH_REQUEST="$(jq -nc --arg ns "<XCSH_NAMESPACE>" --arg start "$XCSH_START_TIME" \--arg end "$XCSH_END_TIME" --arg vh "<XCSH_VIRTUAL_HOST>" '{namespace: $ns, start_time: $start, end_time: $end,step: "5m", range: "5m", group_by: ["VHOST"],label_filter: [{label: "LABEL_VHOST", op: "EQ", value: $vh}],field_selector: {node: {healthscore: {types: ["HEALTHSCORE_CONNECTIVITY", "HEALTHSCORE_PERFORMANCE","HEALTHSCORE_SECURITY", "HEALTHSCORE_RELIABILITY", "HEALTHSCORE_OVERALL"]}}}}')" -
Print available scores and their latest points.
Terminal window XCSH_HEALTH_JSON="$(curl --silent --show-error --fail-with-body --max-time 60 \--request POST \--header "Authorization: APIToken <XCSH_API_TOKEN>" \--header 'Content-Type: application/json' \--data-binary "$XCSH_REQUEST" \"<XCSH_API_URL>/api/data/namespaces/<XCSH_NAMESPACE>/graph/service")"jq -er --arg vh "<XCSH_VIRTUAL_HOST>" '{step, virtual_host: $vh,healthscores: ([.data.nodes[]? | select(.id.vhost == $vh)| .data.healthscore.data[]?| {type, points: (.value | length), latest: (.value[-1] // null)}]| sort_by(.type))}' <<<"$XCSH_HEALTH_JSON"
Measured response
Section titled “Measured response”Captured 2026-10-06T03:13:42Z; HTTP 200.
{ "step": "5m", "virtual_host": "<XCSH_VIRTUAL_HOST>", "healthscores": [ { "type": "HEALTHSCORE_OVERALL", "points": 25, "latest": { "timestamp": 1791256200, "value": "97.61904761904762", "trend_value": null } } ]}The score schema defines percentages; the response has no unit field. This live response returned only HEALTHSCORE_OVERALL, although five types were requested. Other score types are unavailable for this window. Preserve the fractional value and timestamp rather than rounding it to a pass/fail label.