Skip to content
This repository was archived by the owner on May 29, 2024. It is now read-only.

Commit 4c7d36a

Browse files
committed
Update docs on telegram implementation
1 parent 494a064 commit 4c7d36a

File tree

4 files changed

+18
-8
lines changed

4 files changed

+18
-8
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ To use the template, run the following command(s):
3333

3434
1. Create local config file (`config.env`) to store all necessary environmental variables. There's already an example `config.env.template` in the repo that stores default env vars.
3535

36-
2. [Download](https://go.dev/doc/install) or upgrade to `golang 1.19`.
36+
2. [Download](https://go.dev/doc/install) or upgrade to `golang 1.21`.
3737

3838
3. Install all project golang dependencies by running `go mod download`.
3939

alerts-template.yaml

+6-6
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ alertRoutes:
77
channel: ""
88
telegram:
99
low_oncall:
10-
bot_token: ""
11-
chat_id: ""
10+
telegram_bot_token: ""
11+
telegram_chat_id: ""
1212

1313
medium:
1414
slack:
@@ -21,8 +21,8 @@ alertRoutes:
2121
integration_key: ""
2222
telegram:
2323
medium_oncall:
24-
bot_token: ""
25-
chat_id: ""
24+
telegram_bot_token: ""
25+
telegram_chat_id: ""
2626

2727
high:
2828
slack:
@@ -36,5 +36,5 @@ alertRoutes:
3636
integration_key: ""
3737
telegram:
3838
high_oncall:
39-
bot_token: ""
40-
chat_id: ""
39+
telegrambot_token: ""
40+
telegram_chat_id: ""

config.env.template

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ BOOTSTRAP_PATH=genesis.json
1818
SERVER_HOST=localhost
1919
SERVER_PORT=8080
2020
SERVER_KEEP_ALIVE_TIME=10
21-
SERVER_READ_TIMEOUT=10
21+
SERVER_READ_TIMEOUT=10
2222
SERVER_WRITE_TIMEOUT=10
2323
SERVER_SHUTDOWN_TIME=10
2424

docs/alert-routing.md

+10
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ Pessimism currently supports the following alert destinations:
3737
| slack | Sends alerts to a Slack channel |
3838
| pagerduty | Sends alerts to a PagerDuty service |
3939
| sns | Sends alerts to an SNS topic defined in .env file |
40+
| telegram | Sends alerts to a Telegram channel |
4041

4142
## Alert Severity
4243

@@ -58,6 +59,15 @@ topic. The ARN should be added to the `SNS_TOPIC_ARN` variable found in the `.en
5859
The AWS_ENDPOINT is optional and is primarily used for testing with localstack.
5960
> Note: Currently, Pessimism only support one SNS topic to publish alerts to.
6061
62+
## Publishing to a Telegram Channel
63+
64+
It's possible to publish alerts to a Telegram channel by adding the channel's
65+
ID and bot token to the `telegram_bot_token` and `telegram_bot_token`
66+
variables in the `alerts-routing.` configuration file. Generate a bot token by leveraging the
67+
following [guide](https://core.telegram.org/bots#how-do-i-create-a-bot).
68+
69+
> Note: Currently, Pessimism only support one Telegram channel to publish alerts to.
70+
6171
## PagerDuty Severity Mapping
6272

6373
PagerDuty supports the following severities: `critical`, `error`, `warning`,

0 commit comments

Comments
 (0)