https://github.com/telkomdev/datadog-alert-telegram
https://github.com/telkomdev/datadog-alert-telegram
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/telkomdev/datadog-alert-telegram
- Owner: telkomdev
- Created: 2022-08-30T13:08:49.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-08-30T13:39:21.000Z (almost 3 years ago)
- Last Synced: 2025-01-16T20:19:03.614Z (5 months ago)
- Language: Python
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Prerequisites
`export TELEGRAM_BOT_TOKEN=''`
`export TELEGRAM_BOT_CHAT_ID=''`
- Create new telegram channel and add the bot into it
# Datadog Webhook Configuration
- Login to Datadog
- Navigate to *Integrations* -> *Integrations* -> Search for *Webhooks* -> *Configure*- Navigate to bottom and insert the **Name** and **URL** of the receiver
ex:
```
Name = Datadog Test
URL = https://domainnotification
```- Tick `Use Custom Payload` checkbox and fill the *Custom Payload* form with below payload sample
```
{
"event_title": "$EVENT_TITLE",
"alert_title": "$ALERT_TITLE",
"tags": "$TAGS",
"user": "$USER",
"priority": "$PRIORITY",
"text_only_msg": "$TEXT_ONLY_MSG",
"snapshot": "$SNAPSHOT",
"link": "$LINK",
"alert_query": "$ALERT_QUERY"
}
```
- Click `Save Configuration` Button# How to Test
- Run webhook receiver -> ` python scripts/datadog_webhooks/telegram_webhooks.py`- Create Testing Public URL
- Login to Datadog and configure Monitor to send alert to Webhook
- Check telegram channel with bot