Hi team, I'm trying to set up alerts with webhook, our company doesn't use slack so I am trying to s...
l
Hi team, I'm trying to set up alerts with webhook, our company doesn't use slack so I am trying to set it up for google chat, I am filling the webhook field with the google chat webhook, but when I hit test I am getting this error:
Copy code
unknown

unexpected status code 400: { "error": { "code": 400, "message": "Invalid JSON payload received. Unknown name \"receiver\" at 'message': Cannot find field.\nInvalid JSON payload received. Unknown name \"status\" at 'message': Cannot find field.\nInvalid JSON payload received. Unknown name \"alerts\" at 'message': Cannot find field.\nInvalid JSON payload received. Unknown name \"groupLabels\" at 'message': Cannot find field.\nInvalid JSON payload received. Unknown name \"commonLabels\" at 'message': Cannot find field.\nInvalid JSON payload received. Unknown name \"commonAnnotations\" at 'message': Cannot find field.\nInvalid JSON payload received. Unknown name \"externalURL\" at 'message': Cannot find field.\nInvalid JSON payload received. Unknown name \"version\" at 'message': Cannot find field.\nInvalid JSON payload received. Unknown name \"groupKey\" at 'message': Cannot find field.\nInvalid JSON payload received. Unknown name \"truncatedAlerts\" at 'message': Cannot find field.", "status": "INVALID_ARGUMENT", "details": [ { "@type": "<http://type.googleapis.com/google.rpc.BadRequest|type.googleapis.com/google.rpc.BadRequest>", "fieldViolations": [ { "field": "message", "description": "Invalid JSON payload received. Unknown name \"receiver\" at 'message': Cannot find field." }, { "field": "message", "description": "Invalid JSON payload received. Unknown name \"status\" at 'message': Cannot find field." }, { "field": "message", "description": "Invalid JSON payload received. Unknown name \"alerts\" at 'message': Cannot find field." }, { "field": "message", "description": "Invalid JSON payload received. Unknown name \"groupLabels\" at 'message': Cannot find field." }, { "field": "message", "description": "Invalid JSON payload received. Unknown name \"commonLabels\" at 'message': Cannot find field." }, { "field": "message", "description": "Invalid JSON payload received. Unknown name \"commonAnnotations\" at 'message': Cannot find field." }, { "field": "message", "description": "Invalid JSON payload received. Unknown name \"externalURL\" at 'message': Cannot find field." }, { "field": "message", "description": "Invalid JSON payload received. Unknown name \"version\" at 'message': Cannot find field." }, { "field": "message", "description": "Invalid JSON payload received. Unknown name \"groupKey\" at 'message': Cannot find field." }, { "field": "message", "description": "Invalid JSON payload received. Unknown name \"truncatedAlerts\" at 'message': Cannot find field." } ] } ] } }
it seems that the payload that is being sent is not the one that Google Chat expects, this is the payload that works with Google Chat
{"text":"your message"}
. Is there any workaround ??
h
https://signoz.io/docs/alerts-management/notification-channel/webhook/#my-incident-management-tool-is-not-listed-can-i-still-integrate The payload is documented and it's implied to be in Prometheus Alertmanager's schema. You would need to deploy an authenticated webhook (maybe a Google Cloud Function) to extrat the field you want and pass to Google Chat API.
l
thank you