Filtering Rules
Filter and route notifications by priority, tags, title, message, or JSON payload fields.
Filtering rules let you control which notifications reach which channels. Instead of sending everything everywhere, route messages based on priority, tags, or payload content.
How Filtering Works
Each channel can have filtering rules attached. When a notification arrives, Alphorn evaluates the rules for each channel:
- Match — The notification is delivered to that channel
- No match — The notification is skipped for that channel
- No rules — All notifications are delivered (default behavior)
Filter Types
Priority
Route based on notification priority (1–5):
priority >= 4— Only critical and urgent notificationspriority == 1— Only low-priority notificationspriority >= 2 AND priority <= 4— Medium to high priority
Tags
Route based on notification tags:
tags CONTAINS "deploy"— Any notification tagged with "deploy"tags CONTAINS "production" AND tags CONTAINS "error"— Must have both tags
Title & Message
Match against notification content:
title CONTAINS "deploy"— Title includes "deploy"message CONTAINS "error"— Message includes "error"
JSON Payload Paths
For structured payloads, match against specific JSON paths:
payload.environment == "production"— Match a specific fieldpayload.metrics.cpu > 90— Numeric comparison
Combining Conditions
Combine multiple conditions with AND/OR logic:
priority >= 4 AND tags CONTAINS "production"tags CONTAINS "deploy" OR tags CONTAINS "release"Example Setup
Scenario: Critical notifications (priority 4+) go to Email and Telegram so you never miss them. Everything goes to Slack for team visibility.
| Channel | Filter | What it receives |
|---|---|---|
| Slack (#alerts) | No filter | All notifications |
priority >= 4 | Only critical notifications | |
| Telegram | priority >= 4 | Only critical notifications |
A notification with priority: 2 goes to Slack only. A notification with priority: 5 goes to Slack, Email, and Telegram.