Load balancer metrics
Use the discovered XCSH_VIRTUAL_HOST to read traffic arriving at the load balancer and forwarding toward its origin.
The query selects XCSH_NAMESPACE and the discovered XCSH_VIRTUAL_HOST over the fixed two-hour XCSH_START_TIME–XCSH_END_TIME window with five-minute buckets. Ingress and egress selectors require group_by: ["VHOST"] for this deployment. Combining them with SERVICE grouping can return HTTP 500.
-
Build a request grouped by virtual host.
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: {metric: {upstream: ["HTTP_REQUEST_RATE", "HTTP_ERROR_RATE", "HTTP_ERROR_RATE_4XX","HTTP_ERROR_RATE_5XX", "HTTP_RESPONSE_LATENCY","REQUEST_THROUGHPUT", "RESPONSE_THROUGHPUT", "REQUEST_TO_ORIGIN_RATE","CLIENT_RTT", "SERVER_RTT", "HTTP_SERVER_DATA_TRANSFER_TIME","HTTP_INGRESS_REQUEST_RATE", "HTTP_EGRESS_REQUEST_RATE","HTTP_RESPONSE_LATENCY_PERCENTILE_50","HTTP_RESPONSE_LATENCY_PERCENTILE_90","HTTP_RESPONSE_LATENCY_PERCENTILE_99","ACTIVE_CONNECTIONS", "NEW_CONNECTION_RATE"]}}}}')" -
Query and summarize the returned series.
Terminal window XCSH_TRAFFIC_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>" 'def summary: {type, unit, points: (.value.raw | length),latest: (.value.raw[-1] // null)};{step, virtual_host: $vh,metrics: ([.data.nodes[]? | select(.id.vhost == $vh)| .data.metric.upstream[]? | summary] | sort_by(.type)),unavailable: (["ACTIVE_CONNECTIONS", "NEW_CONNECTION_RATE"] -[.data.nodes[]? | select(.id.vhost == $vh) | .data.metric.upstream[]?.type])}' <<<"$XCSH_TRAFFIC_JSON"
Measured response
Section titled “Measured response”Captured 2026-10-06T03:13:42Z; HTTP 200.
{ "step": "5m", "virtual_host": "<XCSH_VIRTUAL_HOST>", "metrics": [ { "type": "CLIENT_RTT", "unit": "UNIT_SECONDS", "points": 14, "latest": { "timestamp": 1791255900, "value": "0.0010500000000000002", "trend_value": null } }, { "type": "HTTP_EGRESS_REQUEST_RATE", "unit": "UNIT_REQUESTS_PER_SECOND", "points": 25, "latest": { "timestamp": 1791256200, "value": "0.03734316666666666", "trend_value": null } }, { "type": "HTTP_ERROR_RATE", "unit": "UNIT_ERRORS_PER_SECOND", "points": 5, "latest": { "timestamp": 1791253200, "value": "0", "trend_value": null } }, { "type": "HTTP_ERROR_RATE_4XX", "unit": "UNIT_ERRORS_PER_SECOND", "points": 5, "latest": { "timestamp": 1791253200, "value": "0", "trend_value": null } }, { "type": "HTTP_INGRESS_REQUEST_RATE", "unit": "UNIT_REQUESTS_PER_SECOND", "points": 25, "latest": { "timestamp": 1791256200, "value": "0.04150983333333333", "trend_value": null } }, { "type": "HTTP_REQUEST_RATE", "unit": "UNIT_REQUESTS_PER_SECOND", "points": 25, "latest": { "timestamp": 1791256200, "value": "0.02860921837322622", "trend_value": null } }, { "type": "HTTP_RESPONSE_LATENCY", "unit": "UNIT_SECONDS", "points": 14, "latest": { "timestamp": 1791255900, "value": "0.8850000000000001", "trend_value": null } }, { "type": "HTTP_RESPONSE_LATENCY_PERCENTILE_50", "unit": "UNIT_SECONDS", "points": 25, "latest": { "timestamp": 1791256200, "value": "NaN", "trend_value": null } }, { "type": "HTTP_RESPONSE_LATENCY_PERCENTILE_90", "unit": "UNIT_MILLISECONDS", "points": 25, "latest": { "timestamp": 1791256200, "value": "NaN", "trend_value": null } }, { "type": "HTTP_RESPONSE_LATENCY_PERCENTILE_99", "unit": "UNIT_SECONDS", "points": 25, "latest": { "timestamp": 1791256200, "value": "NaN", "trend_value": null } }, { "type": "HTTP_SERVER_DATA_TRANSFER_TIME", "unit": "UNIT_SECONDS", "points": 12, "latest": { "timestamp": 1791255900, "value": "0", "trend_value": null } }, { "type": "REQUEST_THROUGHPUT", "unit": "UNIT_BITS_PER_SECOND", "points": 25, "latest": { "timestamp": 1791256200, "value": "82.46763041554156", "trend_value": null } }, { "type": "REQUEST_TO_ORIGIN_RATE", "unit": "UNIT_REQUESTS_PER_SECOND", "points": 25, "latest": { "timestamp": 1791256200, "value": "0.02860921837322622", "trend_value": null } }, { "type": "RESPONSE_THROUGHPUT", "unit": "UNIT_BITS_PER_SECOND", "points": 25, "latest": { "timestamp": 1791256200, "value": "153.03037615105956", "trend_value": null } }, { "type": "SERVER_RTT", "unit": "UNIT_SECONDS", "points": 12, "latest": { "timestamp": 1791255900, "value": "0.43500000000000005", "trend_value": null } } ], "unavailable": [ "ACTIVE_CONNECTIONS", "NEW_CONNECTION_RATE" ]}Interpret the metrics
Section titled “Interpret the metrics”| Metric | Meaning | Returned unit |
|---|---|---|
HTTP_REQUEST_RATE | HTTP requests per second | UNIT_REQUESTS_PER_SECOND |
HTTP_ERROR_RATE, HTTP_ERROR_RATE_4XX, HTTP_ERROR_RATE_5XX | Error rates by response class | UNIT_ERRORS_PER_SECOND |
REQUEST_THROUGHPUT, RESPONSE_THROUGHPUT | Request and response bit rate | UNIT_BITS_PER_SECOND |
HTTP_INGRESS_REQUEST_RATE, HTTP_EGRESS_REQUEST_RATE | Incoming and outgoing request rate | UNIT_REQUESTS_PER_SECOND |
REQUEST_TO_ORIGIN_RATE | Requests forwarded to origin per second | UNIT_REQUESTS_PER_SECOND |
CLIENT_RTT, SERVER_RTT | Average client/server round-trip time | UNIT_SECONDS |
HTTP_RESPONSE_LATENCY and its percentile selectors | Response latency | Read each returned unit |
These measurements have different scopes and sampling behavior; ingress, egress, and origin rates need not match exactly. They do not produce exact request counts. Use HTTP access logs for counts, and origin performance to isolate the matched destination.
points counts metric samples, not requests. latest.timestamp is the returned bucket time in Unix seconds, which can precede capture time. Empty connection series remain supported but unavailable in this demo window. Inspect latest.value together with unit; preserve a surprising returned unit instead of silently relabeling it.
Baseline and later rollup
Section titled “Baseline and later rollup”Both graph queries returned HTTP 200. The baseline was captured at 2026-10-06T03:09:23Z, before the bounded request sequence; the later query was captured at 2026-10-06T03:15:53Z. Each cell preserves the latest returned Unix timestamp and string value. The later request-rate point advanced from 03:05 to 03:15 UTC; a later bucket proves available telemetry, not attribution of every request.
| Metric | Returned unit | Baseline timestamp and value | Later timestamp and value |
|---|---|---|---|
HTTP_REQUEST_RATE | UNIT_REQUESTS_PER_SECOND | 1791255900: 0.03850083333333333 | 1791256500: 0.019619002305555557 |
REQUEST_THROUGHPUT | UNIT_BITS_PER_SECOND | 1791255900: 110.52240666666667 | 1791256500: 55.61405410244444 |
RESPONSE_THROUGHPUT | UNIT_BITS_PER_SECOND | 1791255900: 200.54142015488893 | 1791256500: 53.68032719333334 |
HTTP_INGRESS_REQUEST_RATE | UNIT_REQUESTS_PER_SECOND | 1791255900: 0.05 | 1791256500: 0.016666666666666666 |
HTTP_EGRESS_REQUEST_RATE | UNIT_REQUESTS_PER_SECOND | 1791255900: 0.041666666666666664 | 1791256500: 0.0231765 |
REQUEST_TO_ORIGIN_RATE | UNIT_REQUESTS_PER_SECOND | 1791255900: 0.03850083333333333 | 1791256500: 0.019619002305555557 |
CLIENT_RTT | UNIT_SECONDS | 1791255900: 0.0010500000000000002 | 1791256500: 0.0010500000000000002 |
SERVER_RTT | UNIT_SECONDS | 1791255900: 0.43500000000000005 | 1791255900: 0.43500000000000005 |
HTTP_SERVER_DATA_TRANSFER_TIME | UNIT_SECONDS | 1791255900: 0 | 1791255900: 0 |
HTTP_ERROR_RATE_4XX | UNIT_ERRORS_PER_SECOND | 1791253200: 0 | 1791253200: 0 |
HTTP_ERROR_RATE_5XX | No returned unit | No returned series | No returned series |
The latest 4xx error point remained at 02:20 UTC and the 5xx error series was absent, even though access logs contained the explicit 404 and 503 responses. Those graph error metrics had not supplied meaningful points for the sequence at this capture. Do not turn a stale zero or an absent series into proof of successful requests. Use the complete log counts for observed outcomes.