cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to get problem Id of a Custom Alert event created through API?

AntonioSousa
DynaMight Guru
DynaMight Guru

If one wants to create a Problem in Dynatrace, we can create an event of type "CUSTOM_ALERT", which will make it's way into a Problem.

When creating this event, one gets back correlationId's, but not the ID of the corresponding problem.

What are the best practices for getting the problem ID after a "CUSTOM_ALERT" event creation?

Antonio Sousa
3 REPLIES 3

Yosi_Neuman
DynaMight Guru
DynaMight Guru

Hi @AntonioSousa 

For me running /api/v2/events with eventSelector equals to the correlationId is working OK.

Yosi_Neuman_0-1714380565666.png

HTH

Yos 

dynatrace certificated professional - dynatrace master partner - Matrix Soft Ware Division - Israel

@Yosi_Neuman,

I tried it out, but I only get the event detail.

What I'm trying to find out is the problem Id.

I need this to close the corresponding Problem that is opened, based on the event.

Best strategy I have found out is searching problems by the title of the event, through the "text" scope in problemSelector. Besides the obvious problem of what to search exactly, the text search only supports 30 characters...

There should be a way to search problems that contain a certain event... The information of the correlationId is in the event, which is in the problem data, but it seems that it is not searchable?

Antonio Sousa

Hi @AntonioSousa 

Stand corrected !

Yes, you are right , only the search via text can help here - very odd ! 😞 

Yos 

dynatrace certificated professional - dynatrace master partner - Matrix Soft Ware Division - Israel

Featured Posts