21 Mar 2024 08:18 PM - last edited on 22 Mar 2024 08:40 AM by MaciejNeumann
Hi Team,
I am integrating Problem Notifications into a Google espace webhook, but I am getting an http 400 error
"Invalid JSON payload received"
These are the steps I have taken:
Create space on google.
Create webhook integration in Google space.
Create the Problem Notifications integration in Dynatrace.
I paste the Webhook.
Then I give test notifications and I get error 400
Does anyone know what could be happening or what needs to be done for it to work? or failing that if it is not compatible.
It is the format of webhook.
error
Reason: Invalid HTTP status code
HTTP Response Code: 400 - Bad Request
HTTP Response Body:
{ "error": { "code": 400, "message": "Invalid JSON payload received. Unknown name \"State\" at 'message': Cannot find field.\nInvalid JSON payload received. Unknown name \"ProblemID\" at 'message': Cannot find field.\nInvalid JSON payload received. Unknown name \"ProblemTitle\" at 'message': Cannot find field.", "status": "INVALID_ARGUMENT", "details": [ { "@type": "type.googleapis.com/google.rpc.BadRequest", "fieldViolations": [ { "field": "message", "description": "Invalid JSON payload received. Unknown name \"State\" at 'message': Cannot find field." }, { "field": "message", "description": "Invalid JSON payload received. Unknown name \"ProblemID\" at 'message': Cannot find field." }, { "field": "message", "description": "Invalid JSON payload received. Unknown name \"ProblemTitle\" at 'message': Cannot find field." } ] } ] } }
All this in SAAS.
Greetings Dynatrace Lovers.
Solved! Go to Solution.
28 Mar 2024 12:40 PM
Have you tried to rebuild this custom webhook from scratch? I've used the webhook tester that included the payload as you have shown and it works no problem. I'm curious if the test is failing because the payload is essentially empty in terms of those values.
Have you tried to save the integration and trigger a problem card to see what payload is being sent/received?
07 Oct 2024 04:22 PM
Hello @jfuentes Same issue here, did you solve your issue ?
Thx u
07 Oct 2024 05:14 PM
Hi,
The problem was the payload, I don't know the reason but Google doesn't accept the structure by default.
{
"text": " *{ProblemTitle}*\n`{ImpactedEntityNames}`\n{ProblemDetailsText}\n"
}
Thank you.
08 Oct 2024 08:18 AM
Thank you for your feedback, I came to the same conclusion as you after coming across this recent blog article :
https://www.dynatrace.com/news/blog/chatops-integration-with-dynatrace/
{
"text": " *{State}-{ProblemID}-{ProblemTitle}*\n`{ImpactedEntityNames}`\n{ProblemDetailsText}\n{ProblemURL}\n{Tags}"
}
Bye
08 Oct 2024 01:05 PM
Hi @jfuentes
We have confronted the same scenario before, mainly the message isn't related to connection or authentication errors.
The main point is working around the accepted custom payload with the target integrated technology.
BR,
Peter