Skip to main content
To add your webhook to Metoro, go to the integrations page and click on the Add Webhook button. Fill in the details of the webhook and click on the Add Webhook button. Add Webhook Integration modal with fields for name, URL, HTTP method, headers, and body template
  • Name (required): The name of the webhook
  • URL (required): The URL of the webhook. You can use template variables in the URL for dynamic values (see template variables section below)
  • HTTP Method: The HTTP method to use when sending the webhook. Default is POST
  • Headers: Additional headers to send with the webhook. If you are sending a POST request, Content-Type header is added by default with the value application/json. You can add more headers by clicking on the Add Header button.
  • Body Template (optional): If you would like to send a custom body with the webhook, you can use the body template. Leave empty to use the default JSON payload. You can use template variables in your webhook body (see template variables section below).
  • Folder Location: The filesystem folder where the webhook is saved. Manual webhooks default to /webhooks/default/, and custom team folders must live under /webhooks/.
Webhook folders use the same folder-level permissions as alerts and dashboards. Users only see webhook integrations whose file path they can read, and creating, editing, moving, or deleting a webhook checks permissions against that webhook’s filesystem path.

Kubernetes-managed webhooks

On Kubernetes installs, webhook integrations can also be managed with the MetoroWebhook custom resource:
Metoro syncs Kubernetes-managed webhooks into /webhooks/kubernetes-managed/<cluster>/<namespace>/ and derives the webhook integration ID as kubernetes-managed.<cluster>.<namespace>.<name>. For example, a MetoroWebhook named rootly-critical-alerts in namespace metoro-hub on cluster prod-cluster is referenced from alert YAML as:
Kubernetes-managed webhooks are read-only in the Metoro UI. Edit or delete the Kubernetes resource to change them.
The first MetoroWebhook version stores URL, headers, and body inline in the Kubernetes resource and in Metoro’s exported resource history. Avoid putting values here unless your cluster RBAC and retention settings are appropriate for them.

Exporting an existing webhook as a MetoroWebhook resource

Any webhook can be exported as a kubectl-appliable MetoroWebhook manifest: on the integrations page, click the download icon next to the webhook. This is useful for moving webhooks created in the UI into GitOps-managed configuration. A few things to know about the exported manifest:
  • metadata.name is derived from the webhook’s display name (lowercased and sanitized to a valid Kubernetes name, falling back to webhook-<uuid> if the name contains no usable characters). For webhooks that are already Kubernetes-managed, the original resource name is preserved.
  • No namespace is included — choose it when applying: kubectl apply -n <namespace> -f my-webhook.yaml.
  • Applying the manifest creates a new Kubernetes-managed webhook with ID kubernetes-managed.<cluster>.<namespace>.<name> — it does not take over the original webhook. Update any alerts that reference the original webhook to point at the new one, then delete the original from the UI to avoid duplicate notifications.

Template Variables

You can use template variables in both the webhook URL and body template. The available variables depend on what triggered the webhook: an alert or an AI SRE (Guardian) notification. The same webhook integration can be used as a destination for both.

Alert variables

  • $alert_name: The name of the alert
  • $alert_description: The description of the alert
  • $alert_uuid: The UUID of the alert definition
  • $alert_fire_uuid: The UUID of the specific alert fire instance
  • $alert_state: The state of the alert (either “firing” or “resolved”)
  • $deep_link: Direct link to view the alert details in Metoro
  • $environment: [Deprecated - use $attributes instead] Environment context of the alert. It’s set for Kubernetes and Log alerts only or if the alert has a group by with environment
  • $service: [Deprecated - use $attributes instead] The service associated with the alert. It’s set for Kubernetes and Log alerts only or if the alert has a group by with service.name/service_name/client.service.name/server.service.name.
  • $fired_at: Unix Timestamp when alert was fired
  • $resolved_at: Unix Timestamp when alert was resolved/recovered.
  • $breaching_datapoint_value: The last metric/trace value that triggered the alert. It’s set for Trace and Metric alerts only.
  • $breaching_datapoint_time: Unix Timestamp of the last breaching value. It’s set for Trace and Metric alerts only.
  • $metric_name: Name of the metric that triggered the alert. It’s set for Trace and Metric alerts only.
  • $attributes: List of attribute key and value pairs (in key: value format) for which the alert is firing. Only set when you use a group by in your alert.

AI SRE (Guardian) notification variables

Webhooks can also be used as destinations for AI SRE notifications (deployment monitoring, autonomous investigations, issue notifications, and agent action approvals). These notifications provide the following variables:
  • $title: The notification title, as plain text
  • $message: The notification message, as plain text
  • $type: The specific event type (see the table below) — use this to distinguish notifications on your end
  • $deep_link: Direct link to view the relevant page in Metoro (may be empty for some notification types where the link is embedded in the message instead)
Each notification also exposes its attributes as individual template variables (e.g. $service, $investigationUUID). The built-in variables above are reserved and always win: issue and investigation notifications carry a title attribute, but $title resolves to the full notification title, so that attribute is not accessible as a template variable and is not listed below. The available event types and template variables:

Default Guardian webhook payload

If no body template is set, Guardian notifications send a structured JSON event:
  • id is the UUID of the underlying event — stable across delivery retries, use it for deduplication.
  • type determines the shape of the typed data object; the full schema for every event type is in the Webhook Events section of the API reference (starting at deployment rollout detected).

Examples

URL Examples

You can include template variables directly in your webhook URL:

Body Template Examples

  1. JSON format:
  1. Plain text format:
  1. XML format:
Remember to set the Content-Type header in the headers section with the appropriate value.When the body is sent as JSON (an explicit Content-Type containing json, or the default application/json on POST/PUT requests), substituted values are automatically JSON-string-escaped so multiline messages and quotes don’t break your template — write "message": "$message" without worrying about escaping. For any other content type, values are substituted verbatim.
After your webhook is added, you can select your webhook as a destination in the alert creation wizard. Alert destination selector with Webhook option selected and webhook dropdown showing available webhooks
You can check webhook delivery status and errors in Metoro Logs view. This provides visibility into successful deliveries and any issues encountered. Go to the Logs page and filter by environment=metoro-internal and service.name=metoro-webhooks to see webhook notifications that are successfully sent or failed with errors.