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

feat: add googlechat notifier #3554

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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 <[email protected]>
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.

6 participants