From 8428848844ea530efe6a44c02a6f669bde99cbe8 Mon Sep 17 00:00:00 2001 From: Vadim Stepanov Date: Thu, 25 Aug 2022 14:02:32 +0100 Subject: [PATCH] Telegram docs/instructions update (#406) * update Telegram Setup section for open-source.md * update channel connection instruction * update Telegram configuration docs --- .../chat-options/configure-telegram.md | 26 ++++++++++--------- docs/sources/open-source.md | 12 ++++----- .../TelegramIntegrationButton.tsx | 8 ++++-- 3 files changed, 25 insertions(+), 21 deletions(-) diff --git a/docs/sources/chat-options/configure-telegram.md b/docs/sources/chat-options/configure-telegram.md index e119aff4..daef6ab6 100644 --- a/docs/sources/chat-options/configure-telegram.md +++ b/docs/sources/chat-options/configure-telegram.md @@ -16,15 +16,22 @@ weight: 300 # Telegram integration for Grafana OnCall -You can use Telegram to deliver alert group notifications to a dedicated channel, and allow users to perform notification actions. +You can manage alerts either directly in your personal Telegram DMs or in a dedicated team channel. -Each alert group notification is assigned a dedicated discussion. Users can perform notification actions (acknowledge, resolve, silence), create reports, and discuss alerts in the comments section of the discussions. +## Configure Telegram user settings in Grafana OnCall -In case an integration route is not configured to use a Telegram channel, users will receive messages with alert group contents, logs and actions in their DMs. +To receive alert group contents, escalation logs and to be able to perform actions (acknowledge, resolve, silence) in Telegram DMs, please refer to the following steps: -## Connect to Telegram +1. In your profile, find the Telegram setting and click **Connect**. +1. Click **Connect automatically** for the bot to message you and to bring up your telegram account. +1. Click **Start** when the OnCall bot messages you and wait for the connection confirmation. +1. Done! Now you can receive alerts directly to your Telegram DMs. -Connect your organization's Telegram account to your Grafana OnCall instance by following the instructions provided in OnCall. You can use the following steps as a reference. +If you want to connect manually, you can click the URL provided and then **SEND MESSAGE**. In your Telegram account, click **Start**. + +## (Optional) Connect to a Telegram channel + +In case you want to manage alerts in a dedicated Telegram channel, please use the following steps as a reference. > **NOTE:** Only Grafana users with the administrator role can configure OnCall settings. @@ -42,10 +49,5 @@ Connect your organization's Telegram account to your Grafana OnCall instance by 1. In OnCall, send the provided verification code to the channel. 1. Make sure users connect to Telegram in their OnCall user profile. -## Configure Telegram user settings in OnCall - -1. In your profile, find the Telegram setting and click **Connect**. -1. Click **Connect automatically** for the bot to message you and to bring up your telegram account. -1. Click **Start** when the OnCall bot messages you. - -If you want to connect manually, you can click the URL provided and then **SEND MESSAGE**. In your Telegram account, click **Start**. +Each alert group is assigned a dedicated discussion. Users can perform actions (acknowledge, resolve, silence), and discuss alerts in the comments section of the discussions. +In case an integration route is not configured to use a Telegram channel, users will receive messages with alert group contents, logs and actions in their DMs. diff --git a/docs/sources/open-source.md b/docs/sources/open-source.md index fb02b50f..b2e6c1df 100644 --- a/docs/sources/open-source.md +++ b/docs/sources/open-source.md @@ -166,13 +166,11 @@ lt --port 8080 -s pretty-turkey-83 --print-requests The Telegram integration for Grafana OnCall is designed for collaborative team work and improved incident response. Refer to the following steps to configure the Telegram integration: -1. Ensure your OnCall environment is up and running. - -1. Request [BotFather](https://t.me/BotFather) for a key, then add your key in `TELEGRAM_TOKEN` in your Grafana OnCall **Env Variables**. - -1. Set `TELEGRAM_WEBHOOK_HOST` with your external URL for your Grafana OnCall. - -1. From the **ChatOps** tab in Grafana OnCall, click **Telegram**. +1. Ensure your Grafana OnCall environment is up and running. +2. Create a Telegram bot using [BotFather](https://t.me/BotFather) and save the token provided by BotFather. Please make sure to disable **Group Privacy** for the bot (Bot Settings -> Group Privacy -> Turn off). +3. Paste the token provided by BotFather to the `TELEGRAM_TOKEN` variable on the **Env Variables** page of your Grafana OnCall instance. +4. Set the `TELEGRAM_WEBHOOK_HOST` variable to the external address of your Grafana OnCall instance. Please note that `TELEGRAM_WEBHOOK_HOST` must start with `https://` and be publicly available (meaning that it can be reached by Telegram servers). If your host is private or local, consider using a reverse proxy (e.g. [ngrok](https://ngrok.com)). +5. Now you can connect Telegram accounts on the **Users** page and receive alert groups to Telegram direct messages. Alternatively, in case you want to connect Telegram channels to your Grafana OnCall environment, navigate to the **ChatOps** tab. ## Grafana OSS-Cloud Setup diff --git a/grafana-plugin/src/containers/TelegramIntegrationButton/TelegramIntegrationButton.tsx b/grafana-plugin/src/containers/TelegramIntegrationButton/TelegramIntegrationButton.tsx index f4b66692..256a2a16 100644 --- a/grafana-plugin/src/containers/TelegramIntegrationButton/TelegramIntegrationButton.tsx +++ b/grafana-plugin/src/containers/TelegramIntegrationButton/TelegramIntegrationButton.tsx @@ -147,12 +147,16 @@ const TelegramModal = (props: TelegramModalProps) => { {' '} - , to the channel. + , to the channel and wait for the confirmation message.
- 8. Make sure users connect to Telegram in their OnCall user profile. + 8. Make sure users connect their Telegram accounts in their OnCall user profile. +
+ +
+ 9. Done! Now you can manage alerts in your Telegram workspace.