From b523cf528571be843ed8858b75df8ef4a0e7f7d1 Mon Sep 17 00:00:00 2001 From: Aditya Thebe Date: Fri, 6 Feb 2026 19:14:38 +0545 Subject: [PATCH 1/2] docs(http): fix incorrect template body variables The documentation incorrectly listed 'metadata.*' variables which don't exist in the template context. Fixed to use the correct 'canary.*' and added missing 'check.*' variables. Changes: - Fixed 'metadata.name' -> 'canary.name' - Fixed 'metadata.namespace' -> 'canary.namespace' - Fixed 'metadata.labels' -> 'canary.labels' - Added missing 'canary.id' - Added missing 'check.*' variables (name, id, description, labels, endpoint) - Improved table with descriptions column - Fixed env vars description to use 'env' instead of 'envVars' --- canary-checker/docs/reference/1-http.mdx | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/canary-checker/docs/reference/1-http.mdx b/canary-checker/docs/reference/1-http.mdx index 44344fb9..43f21f9d 100644 --- a/canary-checker/docs/reference/1-http.mdx +++ b/canary-checker/docs/reference/1-http.mdx @@ -106,15 +106,21 @@ The above canary (`http-check.yaml`) is functionally equivalent to `http-check-e ## Template Body Variables -| Name | Scheme | -| ----------------------------- | ------------------- | -| `metadata.name` | string | -| `metadata.namespace` | _string_ | -| `metadata.labels` | _map[string]string_ | -| `{fields from []envVars}` | any | - -Variables defined in `envVars` are available to template with the name that's configured on the spec. -Eg: In the following spec, the vars `my_secret_path` and `my_secret_var`, defined in `envVars`, are available during templating. +| Name | Description | Scheme | +| --------------------- | ------------------------------ | ------------------- | +| `canary.name` | Canary name | `string` | +| `canary.namespace` | Canary namespace | `string` | +| `canary.labels` | Canary labels | `map[string]string` | +| `canary.id` | Persisted Canary ID | `string` | +| `check.name` | Check name | `string` | +| `check.id` | Check ID | `string` | +| `check.description` | Check description | `string` | +| `check.labels` | Check labels | `map[string]string` | +| `check.endpoint` | Check endpoint/URL | `string` | +| `{envVar.name}` | Environment variables defined in `env` | `any` | + +Variables defined in `env` are available to template with the name that's configured on the spec. +Eg: In the following spec, the var `db`, defined in `env`, is available as `{{.db}}` during templating.
From 2089c8319a0e3f4ffd7a29cb8761418b4f0b0f0f Mon Sep 17 00:00:00 2001 From: Aditya Thebe Date: Wed, 11 Feb 2026 14:45:28 +0545 Subject: [PATCH 2/2] docs(http): add dependency output variables to http reference - Add outputs..* variables available when dependsOn is configured - Fix body -> content in request-chaining.mdx to match actual field name --- .../docs/concepts/request-chaining.mdx | 2 +- canary-checker/docs/reference/1-http.mdx | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/canary-checker/docs/concepts/request-chaining.mdx b/canary-checker/docs/concepts/request-chaining.mdx index f1499fee..3131b283 100644 --- a/canary-checker/docs/concepts/request-chaining.mdx +++ b/canary-checker/docs/concepts/request-chaining.mdx @@ -44,7 +44,7 @@ When a check has dependencies, it can access the outputs from those checks using | `outputs..json` | Parsed JSON response body | | `outputs..code` | HTTP response code | | `outputs..headers` | Response headers | -| `outputs..body` | Raw response body | +| `outputs..content` | Raw response body | ### Example: Using Previous Check Output diff --git a/canary-checker/docs/reference/1-http.mdx b/canary-checker/docs/reference/1-http.mdx index 43f21f9d..a31a7abf 100644 --- a/canary-checker/docs/reference/1-http.mdx +++ b/canary-checker/docs/reference/1-http.mdx @@ -122,6 +122,24 @@ The above canary (`http-check.yaml`) is functionally equivalent to `http-check-e Variables defined in `env` are available to template with the name that's configured on the spec. Eg: In the following spec, the var `db`, defined in `env`, is available as `{{.db}}` during templating. +### Dependency Output Variables + +When an HTTP check has [`dependsOn`](../concepts/request-chaining) configured, the `outputs` variable is available for templating. It contains the results from all dependency checks that have completed successfully. + +| Name | Description | Scheme | +|------|-------------|--------| +| `outputs..pass` | Whether the dependency check passed | `bool` | +| `outputs..message` | Result message from the dependency check | `string` | +| `outputs..duration` | Duration of the dependency check in milliseconds | `int64` | +| `outputs..code` | HTTP response code from the dependency check | `int` | +| `outputs..headers` | Response headers from the dependency check | `map[string]string` | +| `outputs..content` | Raw response body from the dependency check | `string` | +| `outputs..json` | Parsed JSON response from the dependency check (if `Content-Type=application/json`) | `JSON` | +| `outputs..elapsed` | HTTP request duration from the dependency check | `time.Duration` | +| `outputs..sslAge` | Time until SSL certificate expires from the dependency check | `time.Duration` | + +See [Request Chaining](../concepts/request-chaining) for examples. +
@@ -140,6 +158,7 @@ Eg: In the following spec, the var `db`, defined in `env`, is available as `{{.d See Escaping variables + ## Metrics | **HTTP Check Metrics** | | |