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

Retrieve problems via DQL

adam_gardner
Dynatrace Champion
Dynatrace Champion

Just a quick tip that you can retrieve problems via DQL:

Here I'm filtering for problems that have been created in the last 30mins which contain `Critical Redis connection error!` in the title.

fetch events, from: now()-30m, to: now()
| filter event.kind == "DAVIS_PROBLEM"
| filter event.status_transition == "CREATED"
| filter matchesPhrase(event.name, "Critical Redis connection error!")

 you can also do this in workflow tasks:

 

import { queryExecutionClient } from "@dynatrace-sdk/client-query";

const data = await queryExecutionClient.queryExecute({
  body: {
  query: 'fetch events, from: now()-30m, to: now() | filter event.kind == "DAVIS_PROBLEM" | filter event.status_transition == "CREATED" | filter matchesPhrase(event.name, "Critical Redis connection error!")',
  },
});
0 REPLIES 0

Featured Posts