Skip to main content
MetrixLLM can trigger notifications when important events occur in your workspace. You can receive alerts via email and webhooks (Slack, Discord, or custom HTTP endpoints). This allows you to integrate gateway observability directly into your own backend or alerting systems.

Webhook events

The gateway fires the following events:

Webhook notifications

Each alert rule can send notifications to one or more webhook URLs in addition to (or instead of) email recipients. The dashboard accepts arbitrary webhook URLs, so you can connect any HTTP endpoint that can receive POST requests.

Supported webhook types

Configuring webhooks

1

Open Settings

In your workspace, go to Settings → Alerts.
2

Create or edit a rule

Click New Rule or edit an existing rule.
3

Add webhook URLs

In the Webhooks field, paste a Slack, Discord, or custom endpoint URL and press Enter to add it. You can add multiple URLs.
4

Select events

Choose which of the 4 events you want this rule to trigger on.
5

Set a secret (Optional)

Enter a cryptographically secure secret. The gateway will use this to sign the payload so your server can verify the request came from MetrixLLM.
An alert rule requires at least one notification destination — either one or more team member emails, one or more webhook URLs, or both.

Getting a Slack webhook URL

  1. Open your Slack workspace and go to Apps → Incoming Webhooks (or visit https://api.slack.com/apps).
  2. Create a new webhook (or use an existing one) and select the channel you want alerts posted to.
  3. Copy the webhook URL (it starts with https://hooks.slack.com/services/...) and paste it into the alert rule’s Webhooks field.

Getting a Discord webhook URL

  1. Open your Discord server and go to Server Settings → Integrations → Webhooks.
  2. Click New Webhook, name it, select the channel, and click Copy Webhook URL.
  3. Paste the URL (it starts with https://discord.com/api/webhooks/...) into the alert rule’s Webhooks field.

Custom endpoint payload

When an alert fires, each configured webhook receives a POST request with a JSON body containing the alert details:
Your endpoint should return a 200 OK (or any 2xx) response. Non-2xx responses or timeouts will not be retried.

Payload signature verification

If you configured a secret, every webhook delivery includes an X-Metrix-Signature header. This header contains an HMAC-SHA256 signature generated using your secret and the raw JSON payload body. Here is an example of how to verify the signature in Python:
Webhook deliveries are fire-and-forget. The gateway sends the payload asynchronously. If your endpoint is down or returns a 5xx error, the delivery will not be automatically retried.