Dynatrace Integration via webhook

Patrick Mischler
Contributor
July 21, 2022

Hello everybody,

I have tested the Dynatrace Integration of OpsGenie. It works with the v1 integration. However, when using the v2 integration via webhook (Custom webhook in dynatrace) the alerts are not generated in OpsGenie. I followed the instructions on Integrate Opsgenie with Dynatrace Webhook (v2) | Opsgenie | Atlassian Support

Any sugestion how I can find out what's wrong?

I use the following payload:

{
"State":"{State}",
"ProblemID":"{ProblemID}",
"ProblemTitle":"{ProblemTitle}",
"ImpactedEntities":{ImpactedEntities},
"ImpactedEntity":"{ImpactedEntity}",
"PID":"{PID}",
"ProblemDetailsHTML":"{ProblemDetailsHTML}",
"ProblemDetailsJSON":{ProblemDetailsJSON},
"ProblemDetailsMarkdown":"{ProblemDetailsMarkdown}",
"ProblemDetailsText":"{ProblemDetailsText}",
"ProblemImpact":"{ProblemImpact}",
"ProblemSeverity":"{ProblemSeverity}",
"ProblemURL":"{ProblemURL}",
"Tags":"{Tags}"
}

Sending the test notification from Dynatrace is successful:

DT_OpsGenie_webhook_notification_test.png

Thank you very much!

Kind Regards,
Patrick

 

2 answers

1 accepted

0 votes
Answer accepted
Nick Haller
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 21, 2022

Hi @Patrick Mischler ,

Some integrations / test alerts trigger through the account's Default API. Not sure if Dynatrace is one of them, but this is how Opsgenie handles some test alerts so the connection can be tested with the actual integration processing taken out of the equation, but ensures there is a connection with Opsgenie.

If you have permission to the Logs tab under the Settings menu, I'd check there to see if Opsgenie received the request from Dynatrace. If you do not have permission to the Logs tab, connect with one of your account Admins or Owners to check.

Patrick Mischler
Contributor
July 21, 2022

Hi Nick,

Thanks for your input. We can see the alerts in the log of OpsGenie. However, they are for some reason not assigned to the team where the integration has been configured.

OpsGenie_Dynatrace_webhook_integration.png

The alerts should be assigned to the team System Management but they don't. This does not happen with the "old" Dynatrace integration.

Kind Regards,
Patrick

Nick Haller
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 22, 2022

Hi @Patrick Mischler ,

Like mentioned above, can you check whether or not the alert / test is being sent through the Default API?

Again - Opsgenie handles some test alerts so the connection can be tested with the actual integration processing taken out of the equation, but ensures there is a connection with Opsgenie.

Patrick Mischler
Contributor
July 22, 2022

Hi Nick

Yes, I can confirm that the alerts are sent through the Default API. 

We have now sent "real" alerts and they came through. 

It is a bit confusing that the test-alerts are not mapped to the Team in OpsGenie but real alerts are.

Regards,
Patrick

Like Nick Haller likes this
Patrick Mischler
Contributor
July 22, 2022

And many thanks!

Like Nick Haller likes this
1 vote
Karthikeyan Mahadevan
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 21, 2022

Not an expert, but recently tried that integration. 

Usually the error would be missing a Quotes or something,  I know for Json we do not have to have double quotes. 
I see double quotes are missing for 

ImpactedEntities":{ImpactedEntities},

can you please try with " around that ? 

Nick Haller
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 21, 2022

That's a great catch @Karthikeyan Mahadevan !

Patrick Mischler
Contributor
July 21, 2022

Hi @Karthikeyan Mahadevan 

I first thought so aswell. But if you look at the screenshot in the documentation, the quotes are also not there. If there are quotes arrount {ImpactedEntities} it doesn't work, because it is not a string but an array. When putting it in quotes, I get the following error in DT:

Unexpected character ('i' (code 105)): was expecting comma to separate Object entries
 at [Source: (String)"{
"State":"{State}",
"ProblemID":"{ProblemID}",
"ProblemTitle":"{ProblemTitle}",
"ImpactedEntities":"["impacted entities array example"]",
"ImpactedEntity":"{ImpactedEntity}",
"PID":"{PID}",
"ProblemDetailsHTML":"{ProblemDetailsHTML}",
"ProblemDetailsJSON":{"id":"abc"},
"ProblemDetailsMarkdown":"{ProblemDetailsMarkdown}",
"ProblemDetailsText":"{ProblemDetailsText}",
"ProblemImpact":"{ProblemImpact}",
"ProblemSeverity":"{ProblemSeverity}",
"ProblemURL":"{ProblemURL}",
"Tags":"{Tags}"
}"; line: 5, column: 24]


Kind Regards,
Patrick

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events