Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable setting ThreadId for Telegram notifications #3638

Merged
merged 4 commits into from
Apr 30, 2024
Merged

Conversation

th0th
Copy link
Contributor

@th0th th0th commented Dec 15, 2023

Enable setting message_thread_id for Telegram notifications.

Also see grafana/grafana#79546.

@yuri-tceretian
Copy link
Contributor

yuri-tceretian commented Dec 15, 2023

Please add

Also, please update the description of this PR with more information. Link to another PR is not a really good description. Thanks!

@th0th
Copy link
Contributor Author

th0th commented Dec 15, 2023

Please add

Also, please update the description of this PR with more information. Link to another PR is not a really good description. Thanks!

Done 👍

The tests looked OK to me, but let me know if you think you need more cases.

@jsDotx3
Copy link

jsDotx3 commented Dec 29, 2023

Any updates?

@yuri-tceretian
Copy link
Contributor

@gotjosh @simonpasquier can you please review the PR?

@@ -753,6 +753,7 @@ type TelegramConfig struct {
BotToken Secret `yaml:"bot_token,omitempty" json:"token,omitempty"`
BotTokenFile string `yaml:"bot_token_file,omitempty" json:"token_file,omitempty"`
ChatID int64 `yaml:"chat_id,omitempty" json:"chat,omitempty"`
MessageThreadID int64 `yaml:"message_thread_id,omitempty" json:"message_thread_id,omitempty"`
Copy link
Contributor

@yuri-tceretian yuri-tceretian Jan 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

according to the documentation the field is Integer, which is a 32-bit signed integer. Perhaps let's change it to int32?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

according to the documentation the field is Integer, which is a 32-bit signed integer. Perhaps let's change it to int32?

Telegram doesn't use 32 bit integer anymore since API Layer 133, Integer in Telegram documentation can be safely assumed as 64-bit integer

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then it looks like there is a discrepancy in the documentation. I refer to Bot API where https://core.telegram.org/bots/api#available-types that says:

It is safe to use 32-bit signed integers for storing all Integer fields unless otherwise noted.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated MessageThreadID as int32, and also updated my branch with the upstream one.

@asonnleitner
Copy link

asonnleitner commented Jan 31, 2024

@yuri-tceretian This is a duplicate of an existing pull request, #3560, which has been pending review since October 16, 2023, nearing four months. Several maintainers have been tagged for attention. It is disappointing to see this duplicate receiving more attention.

@raphielscape
Copy link

@yuri-tceretian This is a duplicate of an existing pull request, #3638, which has been pending review since October 16, 2023, nearing four months. Several maintainers have been tagged for attention. It is disappointing to see this duplicate receiving more attention.

If you mean #3560, this is not duplicate, message_thread_id inclusion is different compared to reply_to_message_id, even though the idea is the same (sending message to a certain topic), message_thread is the intended way to sending a message to a certain topic, reply_to_message, as the fields name says, are more targeted to replying to a certain message ID rather than sending messages.

@asonnleitner
Copy link

@yuri-tceretian This is a duplicate of an existing pull request, #3638, which has been pending review since October 16, 2023, nearing four months. Several maintainers have been tagged for attention. It is disappointing to see this duplicate receiving more attention.

If you mean #3560, this is not duplicate, message_thread_id inclusion is different compared to reply_to_message_id, even though the idea is the same (sending message to a certain topic), message_thread is the intended way to sending a message to a certain topic, reply_to_message, as the fields name says, are more targeted to replying to a certain message ID rather than sending messages.

Thank you, @raphielscape, for explaining the differences between PR #3560 and the current request. Your insight into how message_thread_id differs from reply_to_message_id is very helpful. Considering both PRs are focused on enhancing Telegram-related functionalities, it might be beneficial if the maintainers could review and possibly merge them both 🚀

@cahyahikmawan
Copy link

hi guys, just a quick question.
any plan for merging this PR and releasing the new feature?

@TheMeier
Copy link
Contributor

@th0th
Copy link
Contributor Author

th0th commented Mar 23, 2024

Please rebase and sign. See https://github.com/prometheus/alertmanager/pull/3638/checks?check_run_id=21162278935

I followed the instructions on the link you shared, please let me know if there is anything else I need to do 💐

@grobinson-grafana
Copy link
Contributor

@th0th I don't think you rebased correctly as there are now 73 commits in this PR. Did you use git rebase? You also still need to sign off all of your commits with --signoff.

@th0th
Copy link
Contributor Author

th0th commented Mar 23, 2024

@th0th I don't think you rebased correctly as there are now 73 commits in this PR. Did you use git rebase? You also still need to sign off all of your commits with --signoff.

I followed the exact instructions on the link, but I think the commit history got messed up since I previously merged the upstream branch to my own branch. And now I don't know how to fix 😅

@grobinson-grafana
Copy link
Contributor

You can squash all the commits into a single commit using git rebase and then sign the commit using git commit --amend --no-edit --signoff.

Another option is to delete the branch, create a new branch with the same name, add the modifications, commit them, and then force push the branch to GitHub and it will replace the old branch.

@@ -93,6 +93,7 @@ func (n *Notifier) Notify(ctx context.Context, alert ...*types.Alert) (bool, err
message, err := n.client.Send(telebot.ChatID(n.conf.ChatID), messageText, &telebot.SendOptions{
DisableNotification: n.conf.DisableNotifications,
DisableWebPagePreview: true,
ThreadID: int(n.conf.MessageTheadID),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't compile I'm afraid:

notify/telegram/telegram.go:96:37: n.conf.MessageTheadID undefined (type *"github.com/prometheus/alertmanager/config".TelegramConfig has no field or method MessageTheadID)

@th0th
Copy link
Contributor Author

th0th commented Mar 25, 2024

You can squash all the commits into a single commit using git rebase and then sign the commit using git commit --amend --no-edit --signoff.

Another option is to delete the branch, create a new branch with the same name, add the modifications, commit them, and then force push the branch to GitHub and it will replace the old branch.

I rebased, and it reduced the number of commits but there are still some commits that are shown in this PR, but not mine. No idea why.

The compile fail was due to a typo I guess, I fixed that, too.

@grobinson-grafana
Copy link
Contributor

I rebased, and it reduced the number of commits but there are still some commits that are shown in this PR, but not mine. No idea why.

Can you share the commands you ran to rebase?

@@ -56,6 +56,15 @@
"node": ">=0.10.0"
}
},
"node_modules/@aashutoshrathi/word-wrap": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure where this has come from?

@grobinson-grafana
Copy link
Contributor

Can you also run go mod tidy as otherwise it doesn't seem to compile:

../../../../../../pkg/mod/github.com/go-openapi/spec@v0.20.9/header.go:21:2: missing go.sum entry for module providing package github.com/go-openapi/jsonpointer (imported by github.com/go-openapi/analysis); to add:
	go get github.com/go-openapi/analysis@v0.21.4
../../../../../../pkg/mod/github.com/go-openapi/spec@v0.20.9/ref.go:25:2: missing go.sum entry for module providing package github.com/go-openapi/jsonreference (imported by github.com/go-openapi/spec); to add:
	go get github.com/go-openapi/spec@v0.20.9

@th0th
Copy link
Contributor Author

th0th commented Mar 25, 2024

I rebased, and it reduced the number of commits but there are still some commits that are shown in this PR, but not mine. No idea why.

Can you share the commands you ran to rebase?

I did this:

git remote add upstream https://github.com/prometheus/alertmanager.git
git rebase upstream/main

@grobinson-grafana
Copy link
Contributor

I rebased, and it reduced the number of commits but there are still some commits that are shown in this PR, but not mine. No idea why.

Can you share the commands you ran to rebase?

I did this:

git remote add upstream https://github.com/prometheus/alertmanager.git
git rebase upstream/main

Did you merge main before the rebase? If so, that might have caused the issue. I would just squash all 16 commits in this branch to a single commit using git rebase and then we can go from there. There is a nice tutorial on how to do that here.

@hatamiarash7
Copy link

come on :))) merge this

@grobinson-grafana
Copy link
Contributor

Hi @th0th! 👋 Do you need help with the rebase?

@th0th
Copy link
Contributor Author

th0th commented Apr 16, 2024

Hi @th0th! 👋 Do you need help with the rebase?

I do indeed 🙃

@grobinson-grafana
Copy link
Contributor

OK. I ran the following:

git fetch
git rebase origin/main // here origin is git@github.com:prometheus/alertmanager.git
git rebase -i HEAD~16

I then did the following:

pick 9f7f92cd Enable setting ThreadId for telegram notifications
s 7dceb6fa Fix the typo
s 0274e497 Update tests
s 5ec55ae7 Update documentation
s 15682c4a Update notifiers_test.go
s a75dd888 Update notifiers_test.go
s b6017dd0 Use int32 instead of int64 for MessageThreadID
s 3cecaae6 Bump github.com/go-openapi/swag from 0.22.4 to 0.22.7 (#3655)
d b29d9af6 Support UTF-8 label matchers: Add metrics to matchers compat package (#3658)
d c8eca8d9 Change compat metrics to counters (#3686)
s 3c958067 Bump github.com/go-openapi/errors from 0.20.4 to 0.21.0
s aeb3cdbd Bump github.com/go-openapi/swag from 0.22.7 to 0.22.9
s 37426b93 Bump eslint from 8.35.0 to 8.56.0 in /ui/react-app (#3692)
d 084e0d0c Do not register compat metrics in amtool (#3713)
d 70540688 Remove metrics from compat package (#3714)
s ef146bce Fix the typo

This removes the unrelated commits and squashes the others into a single commit. I also removed the commit messages of all other commits except the first commit. You can see here that this leaves just one commit ahead of main:

git log master..th0th/main --oneline
fa78ab4b (HEAD -> th0th/main) Enable setting ThreadId for telegram notifications
cb9724db (origin/main, origin/HEAD, main) notify/webhook: Fix crash on errors when url_file is used (#3798) (#3800)

@th0th
Copy link
Contributor Author

th0th commented Apr 17, 2024

OK. I ran the following:

git fetch
git rebase origin/main // here origin is git@github.com:prometheus/alertmanager.git
git rebase -i HEAD~16

I then did the following:

pick 9f7f92cd Enable setting ThreadId for telegram notifications
s 7dceb6fa Fix the typo
s 0274e497 Update tests
s 5ec55ae7 Update documentation
s 15682c4a Update notifiers_test.go
s a75dd888 Update notifiers_test.go
s b6017dd0 Use int32 instead of int64 for MessageThreadID
s 3cecaae6 Bump github.com/go-openapi/swag from 0.22.4 to 0.22.7 (#3655)
d b29d9af6 Support UTF-8 label matchers: Add metrics to matchers compat package (#3658)
d c8eca8d9 Change compat metrics to counters (#3686)
s 3c958067 Bump github.com/go-openapi/errors from 0.20.4 to 0.21.0
s aeb3cdbd Bump github.com/go-openapi/swag from 0.22.7 to 0.22.9
s 37426b93 Bump eslint from 8.35.0 to 8.56.0 in /ui/react-app (#3692)
d 084e0d0c Do not register compat metrics in amtool (#3713)
d 70540688 Remove metrics from compat package (#3714)
s ef146bce Fix the typo

This removes the unrelated commits and squashes the others into a single commit. I also removed the commit messages of all other commits except the first commit. You can see here that this leaves just one commit ahead of main:

git log master..th0th/main --oneline
fa78ab4b (HEAD -> th0th/main) Enable setting ThreadId for telegram notifications
cb9724db (origin/main, origin/HEAD, main) notify/webhook: Fix crash on errors when url_file is used (#3798) (#3800)

Thanks a lot @grobinson-grafana. But when I run git rebase -i HEAD~16, and put in the input, it says:

➜  alertmanager git:(main) git rebase -i HEAD~16

error: could not parse '9f7f92cd'
error: invalid line 1: pick 9f7f92cd Enable setting ThreadId for telegram notifications
error: could not parse '7dceb6fa'
error: invalid line 2: s 7dceb6fa Fix the typo
error: could not parse '0274e497'
error: invalid line 3: s 0274e497 Update tests
error: could not parse '5ec55ae7'
error: invalid line 4: s 5ec55ae7 Update documentation
error: could not parse '15682c4a'
error: invalid line 5: s 15682c4a Update notifiers_test.go
error: could not parse 'a75dd888'
error: invalid line 6: s a75dd888 Update notifiers_test.go
error: could not parse 'b6017dd0'
error: invalid line 7: s b6017dd0 Use int32 instead of int64 for MessageThreadID
error: could not parse '3cecaae6'
error: invalid line 8: s 3cecaae6 Bump github.com/go-openapi/swag from 0.22.4 to 0.22.7 (#3655)
error: could not parse 'b29d9af6'
error: invalid line 9: d b29d9af6 Support UTF-8 label matchers: Add metrics to matchers compat package (#3658)
error: could not parse 'c8eca8d9'
error: invalid line 10: d c8eca8d9 Change compat metrics to counters (#3686)
error: could not parse '3c958067'
error: invalid line 11: s 3c958067 Bump github.com/go-openapi/errors from 0.20.4 to 0.21.0
error: could not parse 'aeb3cdbd'
error: invalid line 12: s aeb3cdbd Bump github.com/go-openapi/swag from 0.22.7 to 0.22.9
error: could not parse '37426b93'
error: invalid line 13: s 37426b93 Bump eslint from 8.35.0 to 8.56.0 in /ui/react-app (#3692)
error: could not parse '084e0d0c'
error: invalid line 14: d 084e0d0c Do not register compat metrics in amtool (#3713)
error: could not parse '70540688'
error: invalid line 15: d 70540688 Remove metrics from compat package (#3714)
error: could not parse 'ef146bce'
error: invalid line 16: s ef146bce Fix the typo
You can fix this with 'git rebase --edit-todo' and then run 'git rebase --continue'.
Or you can abort the rebase with 'git rebase --abort'.

What am I doing wrong? :(

@grobinson-grafana
Copy link
Contributor

What am I doing wrong? :(

You should be able to edit what is there when you run git rebase -i HEAD~16 – you don't need to copy/paste what I wrote. Basically you should change all pick to s (for squash) with the following exceptions:

  • 9f7f92cd should be kept as pick because this is the first commit
  • b29d9af6 should be d (for drop)
  • c8eca8d9 should be d (for drop)
  • 084e0d0c should be d (for drop)
  • 70540688 should be d (for drop)

Fix the typo

Signed-off-by: Gokhan Sari <gokhan@sari.me>

Update tests

Signed-off-by: Gokhan Sari <gokhan@sari.me>

Update documentation

Signed-off-by: Gokhan Sari <gokhan@sari.me>

Update notifiers_test.go

Signed-off-by: Gokhan Sari <gokhan@sari.me>

Update notifiers_test.go

Signed-off-by: Gokhan Sari <gokhan@sari.me>

Use int32 instead of int64 for MessageThreadID

Signed-off-by: Gokhan Sari <gokhan@sari.me>

Bump github.com/go-openapi/swag from 0.22.4 to 0.22.7 (prometheus#3655)

Bumps [github.com/go-openapi/swag](https://github.com/go-openapi/swag) from 0.22.4 to 0.22.7.
- [Commits](go-openapi/swag@v0.22.4...v0.22.7)

---
updated-dependencies:
- dependency-name: github.com/go-openapi/swag
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Gokhan Sari <gokhan@sari.me>

Support UTF-8 label matchers: Add metrics to matchers compat package (prometheus#3658)

* Add metrics to matchers compat package

This commit adds the following metrics to the compat package:

  alertmanager_matchers_parse
  alertmanager_matchers_disagree
  alertmanager_matchers_incompatible
  alertmanager_matchers_invalid

With a label called origin to differentiate the different sources
of inputs: the configuration file, the API, and amtool.

The disagree_total metric is incremented when an input is invalid
in both parsers, but results in different parsed representations,
then there is disagreement. This should not happen, and suggests
their is either a bug in one of the parsers or a mistake in the
backwards compatible guarantees of the matchers/parse parser.

The incompatible_total metric is incremented when an input is valid
in pkg/labels, but not the UTF-8 parser in matchers/parse. In such
case, the matcher should be updated to be compatible. This often
means adding double quotes around the right hand side of the matcher.
For example, foo="bar".

The invalid_total metric is incremented when an input is invalid
in both parsers. This was never a valid input.

The tests have been updated to check the metrics are incremented
as expected.

Signed-off-by: George Robinson <george.robinson@grafana.com>

---------

Signed-off-by: George Robinson <george.robinson@grafana.com>
Signed-off-by: Gokhan Sari <gokhan@sari.me>

Change compat metrics to counters (prometheus#3686)

This commit changes the metrics in the compat package from gauges
to counters. The reason for this is that in some cases the gauge
should behave like a gauge (i.e. loading configurations) but in
other cases should behave like a counter (i.e. HTTP requests).

Second, because the compat package is a global package
(due to how config.Load works), in tenanted systems like Cortex
and Mimir it was non-trivial to reset the gauges per tenant
each time their configuration was reloaded.

Instead, it's easier to compute the rate of increase as 0 instead
of check that the gauge is 0 to know if UTF-8 strict mode can be
enabled.

Signed-off-by: George Robinson <george.robinson@grafana.com>
Signed-off-by: Gokhan Sari <gokhan@sari.me>

Bump github.com/go-openapi/errors from 0.20.4 to 0.21.0

Bumps [github.com/go-openapi/errors](https://github.com/go-openapi/errors) from 0.20.4 to 0.21.0.
- [Commits](go-openapi/errors@v0.20.4...v0.21.0)

---
updated-dependencies:
- dependency-name: github.com/go-openapi/errors
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Gokhan Sari <gokhan@sari.me>

Bump github.com/go-openapi/swag from 0.22.7 to 0.22.9

Bumps [github.com/go-openapi/swag](https://github.com/go-openapi/swag) from 0.22.7 to 0.22.9.
- [Commits](go-openapi/swag@v0.22.7...v0.22.9)

---
updated-dependencies:
- dependency-name: github.com/go-openapi/swag
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Gokhan Sari <gokhan@sari.me>

Bump eslint from 8.35.0 to 8.56.0 in /ui/react-app (prometheus#3692)

Bumps [eslint](https://github.com/eslint/eslint) from 8.35.0 to 8.56.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](eslint/eslint@v8.35.0...v8.56.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Gokhan Sari <gokhan@sari.me>

Do not register compat metrics in amtool (prometheus#3713)

There is no need to register these metrics in amtool, so use
compat.NewMetrics(nil) instead of compat.RegisteredMetrics.

Signed-off-by: George Robinson <george.robinson@grafana.com>
Signed-off-by: Gokhan Sari <gokhan@sari.me>

Remove metrics from compat package (prometheus#3714)

This commit removes the metrics from the compat package
in favour of the existing logging and the additional tools
at hand, such as amtool, to validate Alertmanager configurations.

Due to the global nature of the compat package, a consequence
of config.Load, these metrics have proven to be less useful
in practice than expected, both in Alertmanager and other projects
such as Mimir.

There are a number of reasons for this:

1. Because the compat package is global, these metrics cannot be
   reset each time config.Load is called, as in multi-tenant
   projects like Mimir loading a config for one tenant would reset
   the metrics for all tenants. This is also the reason the metrics
   are counters and not gauges.

2. Since the metrics are counters, it is difficult to create
   meaningful dashboards for Alertmanager as, unlike in Mimir,
   configurations are not reloaded at fixed intervals, and as such,
   operators cannot use rate to track configuration changes
   over time.

In Alertmanager, there are much better tools available to validate
that an Alertmanager configuration is compatible with the UTF-8
parser, including both the existing logging from Alertmanager
server and amtool check-config.

In other projects like Mimir, we can track configurations for
individual tenants using log aggregation and storage systems
such as Loki. This gives operators far more information than
what is possible with the metrics, including the timestamp,
input and ID of tenant configurations that are incompatible
or have disagreement.

Signed-off-by: George Robinson <george.robinson@grafana.com>
Signed-off-by: Gokhan Sari <gokhan@sari.me>

Fix the typo

Revert changes in unintended files
@th0th
Copy link
Contributor Author

th0th commented Apr 18, 2024

What am I doing wrong? :(

You should be able to edit what is there when you run git rebase -i HEAD~16 – you don't need to copy/paste what I wrote. Basically you should change all pick to s (for squash) with the following exceptions:

  • 9f7f92cd should be kept as pick because this is the first commit
  • b29d9af6 should be d (for drop)
  • c8eca8d9 should be d (for drop)
  • 084e0d0c should be d (for drop)
  • 70540688 should be d (for drop)

I think I managed to rebase, can you please confirm @grobinson-grafana? 💐

@grobinson-grafana
Copy link
Contributor

I think I managed to rebase, can you please confirm @grobinson-grafana? 💐

Looks good to me! @gotjosh can you help with CircleCI?

@grobinson-grafana
Copy link
Contributor

Thanks Josh! @th0th there are some failing tests (please see CI / Test https://github.com/prometheus/alertmanager/actions/runs/8892559543/job/24416875284?pr=3638). You can also run make test before committing the fix to make sure there are no other failing tests.

Signed-off-by: gotjosh <josue.abreu@gmail.com>
Signed-off-by: gotjosh <josue.abreu@gmail.com>
Copy link
Member

@gotjosh gotjosh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gotjosh gotjosh merged commit a9b5cb4 into prometheus:main Apr 30, 2024
11 checks passed
@gotjosh
Copy link
Member

gotjosh commented Apr 30, 2024

Thank you very much for your contribution!

@grobinson-grafana
Copy link
Contributor

@th0th Thanks also for the contribution! I would appreciate it if you could test it and make sure it works as I cannot seem to create a Telegram supergroup or topics (perhaps I just don't know how to do it?).

@th0th
Copy link
Contributor Author

th0th commented Apr 30, 2024

Thanks for the help getting this merged folks :) @grobinson-grafana I would love to test, but I am using grafana right now, and I don't have alertmanager running separately :(

@grobinson-grafana
Copy link
Contributor

Thanks for the help getting this merged folks :) @grobinson-grafana I would love to test, but I am using grafana right now, and I don't have alertmanager running separately :(

How would I go about starting a thread in Telegram? I've tried creating both a channel and a group and I can't seem to get it to work. With the channel, all replies use reply_to_message_id instead of message_thread_id. With the group, it seems I cannot create topics because I need to have 200 members, and here also all replies use reply_to_message_id instead of message_thread_id.

@grobinson-grafana
Copy link
Contributor

OK, I managed to create a supergroup and then create topics.

receivers:
  - name: telegram
    telegram_configs:
      - bot_token: xxx
        chat_id: -1002096584164
        message_thread_id: 15
route:
  receiver: telegram
  group_wait: 15s
  group_interval: 30s
ts=2024-04-30T15:59:38.854Z caller=dispatch.go:164 level=debug component=dispatcher msg="Received alert" alert=[3fff2c2][active]
ts=2024-04-30T15:59:53.855Z caller=dispatch.go:516 level=debug component=dispatcher aggrGroup={}:{} msg=flushing alerts=[[3fff2c2][active]]
ts=2024-04-30T15:59:54.064Z caller=telegram.go:101 level=debug integration=telegram msg="Telegram message successfully published" message_id=18 chat_id=-1002096584164
ts=2024-04-30T15:59:54.064Z caller=notify.go:863 level=debug component=dispatcher receiver=telegram integration=telegram[0] aggrGroup={}:{} alerts=[[3fff2c2][active]] msg="Notify success" attempts=1 duration=208.804917ms
...
ts=2024-04-30T16:04:53.853Z caller=dispatch.go:516 level=debug component=dispatcher aggrGroup={}:{} msg=flushing alerts=[[3fff2c2][resolved]]
ts=2024-04-30T16:04:53.941Z caller=telegram.go:101 level=debug integration=telegram msg="Telegram message successfully published" message_id=20 chat_id=-1002096584164
ts=2024-04-30T16:04:53.942Z caller=notify.go:863 level=debug component=dispatcher receiver=telegram integration=telegram[0] aggrGroup={}:{} alerts=[[3fff2c2][resolved]] msg="Notify success" attempts=1 duration=88.678291ms
Screenshot 2024-04-30 at 5 05 11 PM

TheMeier pushed a commit to TheMeier/alertmanager that referenced this pull request May 3, 2024
* Enable setting ThreadId for telegram notifications

Signed-off-by: Gokhan Sari <gokhan@sari.m

---------
Signed-off-by: gotjosh <josue.abreu@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants