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
4 REPLIES 4

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

ct_27
DynaMight Pro
DynaMight Pro

ugh...i was finally getting around to similar. Trying to build a bi-directional integration with LogicMonitor and Dynatrace.  I guess another instance where Dynatrace falls short again.  

I agree Antonio.....any Problem created from an Event should have a list of related CorrelationIDs as an attribute. Then an API call to Problems API with the CorrelationID should allow the associated problem to be closed.  With options like, explicit match so that one doesn't accidently close a problem where multiple correlationIDs are related but not all solved.

Dynatrace, if you see this, think about it.  and ,No, I'm not creating a enhancement proposal.

HigherEd

Featured Posts