06 Mar 2025 03:54 PM - edited 06 Mar 2025 08:26 PM
Hi Folks,
Need help on updating payload for custom integration;
We are using {ProblemDetailsText} placeholder in payload however, it gives lot of details
RESOLVED Problem P-1233433 in environment NonProd
Problem detected at: 12:53 (UTC) 01.06.2024 - 12:58 (UTC) 01.06.2024 (was open for 15 min 0 sec)
HTTP monitor
something.com/health
HTTP monitor local outage
1 failure
Location: somelocation
Type: Response status code rules violated, 500: Internal server error
Root cause
Based on our dependency analysis all incidents are part of the same overall problem.
https://{environmentid}.live.dynatrace.com/#problems/problemdetails;pid=1328183131313_1741179228988V2
Out of above detail we just need actual error message i.e. 500: Internal server error
Is it something achievable?
Regards,
AK
06 Mar 2025 04:39 PM
The {ProblemDetailsText} placeholder pretty much represents "all the details" of a problem, provided as a single string. There are other placeholders available which may align to your needs more closely. I believe the 'classic' problem notification function is pretty much limited to using static strings in combination with the available placeholders, without any mechanism to further refine/customize the payload. Anything further would probably be best achieved via the use of a workflow, where you will have the freedom to use custom code for shaping the payload to your exact specifications.
06 Mar 2025 08:25 PM
@marco_irmer that would be interesting, how could I achieve this using workflows can you guide.
Regards,
AK
06 Mar 2025 08:33 PM
Workflows can be triggered by events (including Problems) and offer a wide variety of available actions. The most important thing to know is that you can implement your own JavaScript code within a workflow in order to achieve the desired payload format. Documentation for getting started with Workflows is at https://docs.dynatrace.com/docs/analyze-explore-automate/workflows/quickstart.
07 Mar 2025 10:02 AM
Check out this {
"title":"{ProblemTitle}",
"text":"{ProblemDetailsHTML}",
"themeColor":"EA4300"
}