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

How can I get event statements of problems via Dynatrace API for problem detail?

kohei-saito
Organizer


Hi,


I'm trying to use Dynatrace API to store and utilize some data of Dynatrace in our own external environment.


In this case, some of our customers hope to store and retain Dynatrace Problem data for a long period to compare a latest problem with older ones.


Now, Dynatrace Problems API returns the detail of problem via "GET problem details", but this response has a little more simple content than I expect.


One of what I'd like via Dynatrace API is statement that appears on "Problems" view or
{ProblemDetailText} of Slack notification.


Let me show you examples of statements as follows:


(example 1). Problems



(example 2). Slack notification.


Here, I numbered lines that I want to refer to later, as from (1) to (9):

RESOLVED Problem 182 in environment abc12345

(1)1 impacted infrastructure component
(2)Process
(3)WebLogic base_domain AdminServer

(4)Connectivity problem

(5)TCP connectivity rate for process WebLogic base_domain AdminServer on host WIN-XYZ123 has decreased to 0 %

Root cause

(6)Process

(7)WebLogic base_domain AdminServer

(8)Connectivity problem

(9)TCP connectivity rate for process WebLogic base_domain AdminServer on host WIN-XYZ123 has decreased to 0 %

In addition, this is the returned JSON content related to this Problem:

{
"result": {
"id": "-6506968258263796182_1557362040000V2",
"startTime": 1557362040000,
"endTime": 1557362340000,
"displayName": "182",
"impactLevel": "INFRASTRUCTURE",
"status": "CLOSED",
"severityLevel": "ERROR",
"commentCount": 0,
"tagsOfAffectedEntities": [],
"rankedEvents": [
{
"startTime": 1557362040000,
"endTime": 1557362640000,
"entityId": "PROCESS_GROUP_INSTANCE-1A083B700D2EDB06",
"entityName": "WebLogic base_domain AdminServer",
"severityLevel": "ERROR",
"impactLevel": "INFRASTRUCTURE",
"eventType": "HIGH_CONNECTIVITY_FAILURES",
"status": "CLOSED",
"severities": [],
"isRootCause": true
}
],
"rankedImpacts": [
{
"entityId": "PROCESS_GROUP_INSTANCE-1A083B700D2EDB06",
"entityName": "WebLogic base_domain AdminServer",
"severityLevel": "ERROR",
"impactLevel": "INFRASTRUCTURE",
"eventType": "HIGH_CONNECTIVITY_FAILURES"
}
],
"affectedCounts": {
"INFRASTRUCTURE": 0,
"SERVICE": 0,
"APPLICATION": 0,
"ENVIRONMENT": 0
},
"recoveredCounts": {
"INFRASTRUCTURE": 1,
"SERVICE": 0,
"APPLICATION": 0,
"ENVIRONMENT": 0
},
"hasRootCause": true
}
}


These lead me to suppose that this returned JSON content via Dynatrace API for Problem detail enables us to associate statements on the Problems view with response of API.


Exactly some parts of contents are associated but these statements are not completely.


What I want to mean is as follows:


・Line (1) in Slack notification example seems to be associated with "result"->"rankedEvents"->"impactLevel" in returned JSON.


・Line (2) in Slack notification example seems to be associated with "result"->"rankedEvents"->"entityId" in returned JSON.


・Line (3) in Slack notification example seems to be associated with "result"->"rankedEvents"->"entityName" in returned JSON.


・Line (4) in Slack notification example seems to be associated with "result"->"rankedEvents"->"eventType" in returned JSON.


However, the expression of Line (4) in Slack notificationis is a little different from that of "result"->"rankedEvents"->"eventType".


・Line (5) in Slack notification example seems to be associated with "result"->"rankedEvents"->"eventType" in returned JSON.


However, the expression of Line (5) in Slack notificationis is more complex than that of "result"->"rankedEvents"->"eventType".


These (1)-(3) expression are easy to suppose and it is easy to calculate their counts or names with returned values.


However, on the other hand, I think it is difficult to guess correspondence between (4)&(5) and each statement on Problems view respectively.


I'd like to get this statement shown on Problems view via DynatraceAPI for Problems detail, or know correspondence between "result"->"rankedEvents"->"eventType" and statements in order to manage results of past problem detail in external systems.


(I think it will be difficult to understand if I have information about only eventType without statements.)





If you have any information about which eventType have what statements, please let me know that.


(Or I hope the update of Dynatrace API for problem detail.)





I am not sure if this post make sense, I'm glad if you help me in any way.


Thanks,


Kohei Saito


2 REPLIES 2

kulwinder_singh
Inactive

I don't think we can pull that info as if now.


kulwinder_singh
Inactive

Until unless that field is available in JSON we may not be able to pull it.