Add configurable Google Chat and custom webhooks#4484
Open
ameyap94 wants to merge 1 commit intotarget:masterfrom
Open
Add configurable Google Chat and custom webhooks#4484ameyap94 wants to merge 1 commit intotarget:masterfrom
ameyap94 wants to merge 1 commit intotarget:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
Google Chat incoming webhooks do not accept GoAlert’s generic webhook payload directly. Google Chat expects a Chat message payload, so sending GoAlert’s JSON as-is results in a payload shape mismatch.
This PR adds:
{"text":"..."}payload Google Chat expectsThe existing generic webhook contact method continues to use
Webhook.Enable.Custom Webhook examples:
Simple summary text:
Service alert count:
On-call change:
The template context also exposes fields such as: MessageID, AppName, Type, AlertID, Details, ServiceID, ServiceName, Count, LogEntry, Code, ScheduleID, ScheduleName, ScheduleURL, NewAlertState, Users, and Meta.
Which issue(s) this PR fixes:
None
Screenshots:
Admin configuration

Google Chat Escalation step setup




Escalation steps showing Google Chat destination chip
Notification rule with Google Chat
Notification rule showing Google Chat destination chip
Custom Webhook notification setup

Message previews


Escalation
Notification rule
Describe any introduced user-facing changes:
Describe any introduced API changes:
GoogleChat.EnableCustomWebhook.EnableAdditional Info:
Verified with:
go test ./config ./graphql2 ./notification/webhook ./notification/googlechat ./app -count=1node_modules/.bin/tsc -p web/src/app/tsconfig.json --noEmit