system:
notify:
active_window:
start: "08:00"
end: "22:00"
timezone: "Asia/Shanghai"
days: ["mon", "tue", "wed", "thu", "fri"]
bypass_severity: error
pipeline:
transforms:
- id: notify_passthrough
inputs: [source::system::notify]
outputs: [notify_email, notify_telegram, notify_webhook]
steps: []
sinks:
- id: notify_email
type: notify
config:
provider: email
smtp:
server: "smtp.example.com"
port: 587
username: "user@example.com"
password: "password"
security: starttls
from: "alerts@example.com"
to:
- "oncall@example.com"
subject: "[{{ $.severity }}] {{ $.name }}"
message: "{{ $.message }}"
- id: notify_telegram
type: notify
config:
provider: telegram
bot_token: "YOUR_TELEGRAM_BOT_TOKEN"
chat_id: "123456789"
parse_mode: "MarkdownV2"
message: "*{{ $.severity }}*: {{ $.message }}"
- id: notify_webhook
type: notify
config:
provider: webhook
url: "https://example.com/webhook"
method: POST
headers:
Authorization: "Bearer token"
body: full
message: "[{{ $.severity }}] {{ $.name }}: {{ $.message }}"
silence:
window: 2h
backend: memory
key: "{{ $.name }}|{{ $.labels.host }}"