Hi Dynatracers!
We have a solution that executes actions based on specific conditions detected in Dynatrace using Dynatrace events. To facilitate this I’ve setup a Dynatrace problem integration that loops back into Dynatrace via a webhook problem notification.
Overall the structure works fine and is in general doing what I need, however I’m having some issues getting the JSON fields to travel through the the problem notification in a way that’s acceptable to the Dynatrace V2 events ingest API (/api/v2/events/ingest).
To be specific, in order for this to work I need to send the problem information through as an event ‘property’ - this works fine for the standard ‘string’ style fields available in the problem notification, but won’t work for any of the complex elements such as ProblemDetailsJSONv2. Even attempting to send a test notification results in an error (400 - Bad Request) - {“error”:{“code”:400,“message”:“Could not map JSON at ‘properties.probDeets’ near line 19 column 18”}}
Worst case sending ProblemDetailsText works correctly, but using a JSON version would be much nicer when working with it on the other side.
Any suggestions? I’m thinking this is almost certainly a constraint from the v2 event/ingest api (can’t take a JSON struct as a property) - looking for any workarounds/thoughts?
Problem Notification Payload Definition:
{
“eventType”: “CUSTOM_INFO”,
“title”: “Run Action Request”,
“properties”: {
“reqId”: “00”,
“target”: “{ImpactedEntity}”,
“retryOnFail”: false,
“dt.event.source”: “ACTION_REQUEST”,
“ImpactedEntityNames”: “{ImpactedEntityNames}”,
“ImpactedEntity”: “{ImpactedEntity}”,
“ProblemID”: “{ProblemID}”,
“ProblemDetails”: “{ProblemDetailsText}”,
“source”: “DynatraceNative”,
“probDeetsTXT”: “{ProblemDetailsText}”,
“probDeets”: {ProblemDetailsJSONv2}
},
“timeout”: 1
}
All help greatly appreciated!