@cryptotaxi247 / netdata-1 / commits / fbe5a35a8

Update telegram documentation (#16777)

thiagoftsm committed Jan 15, 2024 at 13:23 UTC fbe5a35a8d00976febf10733bb1b0506b23d9828
2 files changed +21 -23
health/notifications/telegram/README.md
+10 -11
@@ -25,10 +25,9 @@ Send notifications to Telegram using Netdata's Agent alert notification feature,
25
26 ####
27
28 -- A bot token. To get one, contact the [@BotFather](https://t.me/BotFather) bot and send the command `/newbot` and follow the instructions. Start a conversation with your bot or invite it into a group where you want it to send messages.
29 -- The chat ID for every chat you want to send messages to. Contact the [@myidbot](https://t.me/myidbot) bot and send the `/getid` command to get your personal chat ID or invite it into a group and use the `/getgroupid` command to get the group chat ID. Group IDs start with a hyphen, supergroup IDs start with `-100`.
30 -- Alternatively, you can get the chat ID directly from the bot API. Send your bot a command in the chat you want to use, then check `https://api.telegram.org/bot{YourBotToken}/getUpdates`, eg. `https://api.telegram.org/bot111122223:7OpFlFFRzRBbrUUmIjj5HF9Ox2pYJZy5/getUpdates`
31 -- Terminal access to the Agent you wish to configure
28 +- A bot token. To get one, contact the [@BotFather](https://t.me/BotFather) bot and send the command `/newbot` and follow the instructions. Invite your bot to a group where you want it to send messages.
29 +- The chat ID for every chat you want to send messages to. Invite [@myidbot](https://t.me/myidbot) bot to the group that will receive notifications, and write the command `/getgroupid@myidbot` to get the group chat ID. Group IDs start with a hyphen, supergroup IDs start with `-100`.
30 +- Terminal access to the Agent you wish to configure.
31
32
33
@@ -56,7 +55,7 @@ The following options can be defined for this notification
55 |:----|:-----------|:-------|:--------:|
56 | SEND_TELEGRAM | Set `SEND_TELEGRAM` to YES | YES | yes |
57 | TELEGRAM_BOT_TOKEN | set `TELEGRAM_BOT_TOKEN` to your bot token. | | yes |
59 -| DEFAULT_RECIPIENT_TELEGRAM | Set `DEFAULT_RECIPIENT_TELEGRAM` to the chat ID you want the alert notifications to be sent to. You can define multiple chat IDs like this: 49999333322 -1009999222255. | | yes |
58 +| DEFAULT_RECIPIENT_TELEGRAM | Set `DEFAULT_RECIPIENT_TELEGRAM` to the chat ID you want the alert notifications to be sent to. You can define multiple chat IDs like this: -49999333322 -10099992222. | | yes |
59
60 ##### DEFAULT_RECIPIENT_TELEGRAM
61
@@ -65,12 +64,12 @@ All roles will default to this variable if left unconfigured.
64 The `DEFAULT_RECIPIENT_CUSTOM` can be edited in the following entries at the bottom of the same file:
65
66 ```conf
68 -role_recipients_telegram[sysadmin]="49999333324"
69 -role_recipients_telegram[domainadmin]="49999333389"
67 +role_recipients_telegram[sysadmin]="-49999333324"
68 +role_recipients_telegram[domainadmin]="-49999333389"
69 role_recipients_telegram[dba]="-1009999222255"
71 -role_recipients_telegram[webmaster]="-1009999222255 49999333389"
72 -role_recipients_telegram[proxyadmin]="49999333344"
73 -role_recipients_telegram[sitemgr]="49999333876"
70 +role_recipients_telegram[webmaster]="-1009999222255 -49999333389"
71 +role_recipients_telegram[proxyadmin]="-49999333344"
72 +role_recipients_telegram[sitemgr]="-49999333876"
73 ```
74
75
@@ -88,7 +87,7 @@ role_recipients_telegram[sitemgr]="49999333876"
87
88 SEND_TELEGRAM="YES"
89 TELEGRAM_BOT_TOKEN="111122223:7OpFlFFRzRBbrUUmIjj5HF9Ox2pYJZy5"
91 -DEFAULT_RECIPIENT_TELEGRAM="-100233335555"
90 +DEFAULT_RECIPIENT_TELEGRAM="-49999333876"
91
92 ```
93
health/notifications/telegram/metadata.yaml
+11 -12
@@ -18,10 +18,9 @@
18 list:
19 - title: ''
20 description: |
21 - - A bot token. To get one, contact the [@BotFather](https://t.me/BotFather) bot and send the command `/newbot` and follow the instructions. Start a conversation with your bot or invite it into a group where you want it to send messages.
22 - - The chat ID for every chat you want to send messages to. Contact the [@myidbot](https://t.me/myidbot) bot and send the `/getid` command to get your personal chat ID or invite it into a group and use the `/getgroupid` command to get the group chat ID. Group IDs start with a hyphen, supergroup IDs start with `-100`.
23 - - Alternatively, you can get the chat ID directly from the bot API. Send your bot a command in the chat you want to use, then check `https://api.telegram.org/bot{YourBotToken}/getUpdates`, eg. `https://api.telegram.org/bot111122223:7OpFlFFRzRBbrUUmIjj5HF9Ox2pYJZy5/getUpdates`
24 - - Terminal access to the Agent you wish to configure
21 + - A bot token. To get one, contact the [@BotFather](https://t.me/BotFather) bot and send the command `/newbot` and follow the instructions. Invite your bot to a group where you want it to send messages.
22 + - The chat ID for every chat you want to send messages to. Invite [@myidbot](https://t.me/myidbot) bot to the group that will receive notifications, and write the command `/getgroupid@myidbot` to get the group chat ID. Group IDs start with a hyphen, supergroup IDs start with `-100`.
23 + - Terminal access to the Agent you wish to configure.
24 configuration:
25 file:
26 name: 'health_alarm_notify.conf'
@@ -41,7 +40,7 @@
40 required: true
41 - name: 'DEFAULT_RECIPIENT_TELEGRAM'
42 default_value: ''
44 - description: "Set `DEFAULT_RECIPIENT_TELEGRAM` to the chat ID you want the alert notifications to be sent to. You can define multiple chat IDs like this: 49999333322 -1009999222255."
43 + description: "Set `DEFAULT_RECIPIENT_TELEGRAM` to the chat ID you want the alert notifications to be sent to. You can define multiple chat IDs like this: -49999333322 -1009999222255."
44 required: true
45 detailed_description: |
46 All roles will default to this variable if left unconfigured.
@@ -49,12 +48,12 @@
48 The `DEFAULT_RECIPIENT_CUSTOM` can be edited in the following entries at the bottom of the same file:
49
50 ```conf
52 - role_recipients_telegram[sysadmin]="49999333324"
53 - role_recipients_telegram[domainadmin]="49999333389"
54 - role_recipients_telegram[dba]="-1009999222255"
55 - role_recipients_telegram[webmaster]="-1009999222255 49999333389"
56 - role_recipients_telegram[proxyadmin]="49999333344"
57 - role_recipients_telegram[sitemgr]="49999333876"
51 + role_recipients_telegram[sysadmin]="-49999333324"
52 + role_recipients_telegram[domainadmin]="-49999333389"
53 + role_recipients_telegram[dba]="-10099992222"
54 + role_recipients_telegram[webmaster]="-10099992222 -49999333389"
55 + role_recipients_telegram[proxyadmin]="-49999333344"
56 + role_recipients_telegram[sitemgr]="-49999333876"
57 ```
58 examples:
59 folding:
@@ -71,7 +70,7 @@
70
71 SEND_TELEGRAM="YES"
72 TELEGRAM_BOT_TOKEN="111122223:7OpFlFFRzRBbrUUmIjj5HF9Ox2pYJZy5"
74 - DEFAULT_RECIPIENT_TELEGRAM="-100233335555"
73 + DEFAULT_RECIPIENT_TELEGRAM="-49999333876"
74 troubleshooting:
75 problems:
76 list: []