Skip to content

Conversation

@tamcore
Copy link
Contributor

@tamcore tamcore commented Oct 11, 2023

This will add a Google Chat notifier and allow existing setups to replace the slightly aged calert with a native integration.

Essentially all that's required is to send a POST with {"text": "our alert"}, so there isn't too much breakage potential :D

  • it actually works
  • documentation
  • tests (sorta)

#2940 2940

@gotjosh
Copy link
Member

gotjosh commented Oct 12, 2023

Nice! Thanks @tamcore - Do you have any stats on downloads/usage over the past 6 months? I can see that it has a decent number of stars but would love to know more about the usage itself.

@tamcore
Copy link
Contributor Author

tamcore commented Oct 12, 2023

Not really. But according to https://github.com/mr-karan/calert/pkgs/container/calert/64363789?tag=v2.0.6 the latest release had 39353 downloads during the 9 months since release.

But there's definitely some interest, and at our company we use it as well (but only one of those 39353 pulls is from us - we use an image cache :D)

@tamcore tamcore force-pushed the feat/googlechat branch 2 times, most recently from 06b63fb to dee0b99 Compare October 17, 2023 16:23
@tamcore
Copy link
Contributor Author

tamcore commented Nov 2, 2023

@simonpasquier / @gotjosh any chance to get this included? :)

@uded
Copy link

uded commented Nov 13, 2023

I would like to see this included. Running external service for simple notifications is a pain in the back. This change doesn't look so dramatic, it should be merged relatively easily...

@shivam199064
Copy link

It shows the error:
ts=2024-01-18T12:57:51.801Z caller=coordinator.go:126 level=info component=configuration msg="Completed loading of configuration file" file=/etc/alertmanager/config.yml
ts=2024-01-18T12:57:51.806Z caller=cluster.go:692 level=info component=cluster msg="gossip not settled but continuing anyway" polls=0 elapsed=69.811041ms
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xe28cf1]
goroutine 1 [running]:
github.com/prometheus/alertmanager/notify/googlechat.New(0xc00099a3c0, 0xc0005df398, {0x1612340?, 0xc00020f5e0}, {0x0?, 0x0?, 0x0?})
/root/shivam/alertmanager/notify/googlechat/googlechat.go:44 +0x51
github.com/prometheus/alertmanager/config/receiver.BuildReceiverIntegrations.func15({0x1612340?, 0xc00020f5e0?})
/root/shivam/alertmanager/config/receiver/receiver.go:97 +0x3c
github.com/prometheus/alertmanager/config/receiver.BuildReceiverIntegrations.func1({0x10cf6f5, 0xa}, 0x0, {0x1612900, 0xc00099a3c0}, 0xc000c44958)
/root/shivam/alertmanager/config/receiver/receiver.go:48 +0xe6
github.com/prometheus/alertmanager/config/receiver.BuildReceiverIntegrations({{0xc000b67de0, 0xa}, {0x0, 0x0, 0x0}, {0x0, 0x0, 0x0}, {0x0, 0x0, ...}, ...}, ...)
/root/shivam/alertmanager/config/receiver/receiver.go:97 +0x1030
main.run.func9(0xc000000aa0)
/root/shivam/alertmanager/cmd/alertmanager/main.go:393 +0x5af
github.com/prometheus/alertmanager/config.(*Coordinator).notifySubscribers(...)
/root/shivam/alertmanager/config/coordinator.go:87
github.com/prometheus/alertmanager/config.(*Coordinator).Reload(0xc00057f500)
/root/shivam/alertmanager/config/coordinator.go:131 +0x5b6
main.run()
/root/shivam/alertmanager/cmd/alertmanager/main.go:481 +0x5605
main.main()
/root/shivam/alertmanager/cmd/alertmanager/main.go:125 +0x13

@mehdicopter
Copy link

Hey folks 👋
also interested in this feature 😊

@nathanlcarlson
Copy link

It looks like something similar to this MSTeams code needs to be added in config/config.go:

https://github.com/prometheus/alertmanager/blob/main/config/config.go#L535-L542

@tamcore tamcore force-pushed the feat/googlechat branch 2 times, most recently from 9bc26dd to 3a06e45 Compare January 16, 2025 06:51
Signed-off-by: Philipp Born <git@pborn.eu>
@erwan-socrate
Copy link

Hello, Any infos when this PR could be merged ? :D
I am very interested in this feature

@tamcore
Copy link
Contributor Author

tamcore commented Mar 7, 2025

@simonpasquier / @gotjosh / @w0rm / @grobinson-grafana any chances? :)

@moritz-da
Copy link

Hey there!
Any updates on this PR? I’d really appreciate this feature too. Also, is there a native way to send alerts from alertmanager to Google Chat (without tools like calert)?

@izeal
Copy link

izeal commented Oct 30, 2025

+1

Copy link
Contributor

@siavashs siavashs left a comment

Choose a reason for hiding this comment

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

Seems still valid, left a suggestion.
Please rebase and update.

Comment on lines +57 to +62
// Message represents the structure for sending a
// Text message in Google Chat Webhook endpoint.
// https://developers.google.com/chat/api/guides/message-formats/basic
type Message struct {
Text string `json:"text"`
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link

Choose a reason for hiding this comment

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

please give as an option to send text messages first 🙏

Copy link
Contributor

Choose a reason for hiding this comment

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

Cards are just attachments to a message, it is not a replacement.
One can choose to send text, card or both.

@tamcore
Copy link
Contributor Author

tamcore commented Oct 31, 2025

I'm sorry, I don't feel like further rebasing or even extending this, until there is a clear sign this will get approval.

@SoloJacobs
Copy link
Contributor

Hi @tamcore ,

currently the process for adding new integrations is not straightforward and I apologize for that. That being said, we do generally accept these types of requests now.

Is it possible for you to spend some time providing community support? By answering questions about issues opened by users relating to your integration. In return, I commit to providing speedy reviews and will advocate for the inclusion of your PRs.

Thank you very much for your time and potential contribution!

Kind regards, Solomon Jacobs

@SoloJacobs SoloJacobs removed their assignment Dec 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.