From 9beb4137f44d1cf736c5e047ff39c96abf18208a Mon Sep 17 00:00:00 2001 From: antonio <45235678+tonypowa@users.noreply.github.com> Date: Sat, 6 Jul 2024 07:40:26 +0200 Subject: [PATCH] alerting/integrations:telegram-update backport PR (#90111) * alerting/integrations:telegram-update (#90105) * alerting/integrations:telegram-update * Update docs/sources/alerting/configure-notifications/manage-contact-points/integrations/configure-telegram.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/manage-contact-points/integrations/configure-telegram.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> --------- Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> (cherry picked from commit 8bc8b4b31f008d5d4e7624bf922635d460e791f6) * Update _index.md --- .../manage-contact-points/_index.md | 26 +++++++++++++++++-- .../integrations/configure-telegram.md | 26 +++---------------- 2 files changed, 27 insertions(+), 25 deletions(-) diff --git a/docs/sources/alerting/configure-notifications/manage-contact-points/_index.md b/docs/sources/alerting/configure-notifications/manage-contact-points/_index.md index 437442c76cd..5f7a160b03e 100644 --- a/docs/sources/alerting/configure-notifications/manage-contact-points/_index.md +++ b/docs/sources/alerting/configure-notifications/manage-contact-points/_index.md @@ -26,6 +26,21 @@ labels: title: Configure contact points weight: 410 refs: + email: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/configure-notifications/manage-contact-points/integrations/configure-email/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/manage-contact-points/integrations/configure-email/ + discord: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/configure-notifications/manage-contact-points/integrations/configure-discord/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/manage-contact-points/integrations/configure-discord/ + telegram: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/configure-notifications/manage-contact-points/integrations/configure-telegram/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/manage-contact-points/integrations/configure-telegram/ webhook: - pattern: /docs/grafana/ destination: /docs/grafana//alerting/configure-notifications/manage-contact-points/integrations/webhook-notifier/ @@ -36,7 +51,12 @@ refs: destination: /docs/grafana//alerting/configure-notifications/manage-contact-points/integrations/configure-slack/ - pattern: /docs/grafana-cloud/ destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/manage-contact-points/integrations/configure-slack/ - oncall: + teams: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/configure-notifications/manage-contact-points/integrations/configure-teams/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/manage-contact-points/integrations/configure-teams/ + external-alertmanager: - pattern: /docs/grafana/ destination: /docs/grafana//alerting/configure-notifications/manage-contact-points/integrations/configure-oncall/ - pattern: /docs/grafana-cloud/ @@ -132,12 +152,14 @@ Once configured, you can use integrations as part of your contact points to rece | DingDing | `dingding` | | Discord | `discord` | | Email | `email` | +| [Discord](ref:discord) | `discord` | +| [Email](ref:email) | `email` | | Google Chat | `googlechat` | | [Grafana Oncall](ref:oncall) | `oncall` | | Hipchat | `hipchat` | | Kafka | `kafka` | | Line | `line` | -| Microsoft Teams | `teams` | +| [Microsoft Teams](ref:teams) | `teams` | | Opsgenie | `opsgenie` | | [Pagerduty](ref:pagerduty) | `pagerduty` | | Prometheus Alertmanager | `prometheus-alertmanager` | diff --git a/docs/sources/alerting/configure-notifications/manage-contact-points/integrations/configure-telegram.md b/docs/sources/alerting/configure-notifications/manage-contact-points/integrations/configure-telegram.md index de616f7fd96..f1464038b8d 100644 --- a/docs/sources/alerting/configure-notifications/manage-contact-points/integrations/configure-telegram.md +++ b/docs/sources/alerting/configure-notifications/manage-contact-points/integrations/configure-telegram.md @@ -24,7 +24,7 @@ Use the Grafana Alerting - Telegram integration to send [Telegram](https://teleg ### Telegram bot API token and chat ID -To integrate Grafana with Telegram, you need to obtain a Telegram **bot API token** and a **chat ID** (i.e., the ID of the Telegram chat where you want to receive the alert notifications). +To integrate Grafana with Telegram, you need to get a Telegram **bot API token** and a **chat ID** (the ID of the Telegram chat where you want to receive the alert notifications). To complete the integration, use the browser version of Telegram. ### Set up your Telegram bot @@ -44,29 +44,9 @@ Add the bot to a group chat by following the steps below. Once the bot is added 1. In the Telegram app, **open a group or start a new one**. 1. Search and **add the bot to the group**. -1. **Interact with the bot** by sending a dummy message that starts with "`/`". E.g. `/hola @bot_name`. +1. Copy the **chat ID** from the URL in your browser's address bar. It should look like this: `https://web.telegram.org/a/#-4266674385`. - {{< figure src="/media/blog/telegram-grafana-alerting/telegram-screenshot.png" alt="A screenshot that shows a message to a Telegram bot." >}} - -1. To obtain the **chat ID**, send an [HTTP request](https://core.telegram.org/bots/api#getupdates) to the bot. Copy the below URL and replace `{your_bot_api_token}` with your bot API token. - - ``` - https://api.telegram.org/bot{your_bot_api_token}/getUpdates - ``` - -1. **Paste the URL in your browser**. -1. If the request is successful, it will return a response in JSON format. - - ``` - ... - "chat": { - "id": -4065678900, - "title": "Tony and Hello world bot", - "type": "group", - ... - ``` - -1. Copy the value of the `“id”` that appears under `“chat”`. + The chat ID is the sequence of numbers that follows the `#` symbol. For example: `-4266674385`. ## Procedure