Integrations
Webhook Integration
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.
- Name (required): The name of the webhook
- URL (required): The URL of the webhook
- 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 valueapplication/json
. You can add more headers by clicking on theAdd Header
button. - Body Template: If you would like to send a custom body with the webhook, you can use the body template. You can use the following template variables in your webhook body:
- $alert_name: The name of the alert
- $alert_description: The description of the alert
- $environment: Environment context of the alert. It's set for Kubernetes and Log alerts only.
- $service: The service associated with the alert. It's set for Kubernetes and Log alerts only.
- $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.
Example Body Templates:
- JSON format:
{ "alert": "$alert_name", "value": "$breaching_datapoint_value" }
- Plain text format:
Alert $alert_name was triggered with value $breaching_datapoint_value
- XML format:
<alert><name>$alert_name</name><value>$breaching_datapoint_value</value></alert>
📘 NOTE: Remember to set the Content-Type
header in the headers section with the appropriate value.
After your webhook is added, you can select your webhook as a destination in the alert creation wizard.