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

Lookup on ALL entities...without 8+ lines of code

jennieBYU
Visitor

dt.entity.id and dt.entity.name seem to only be pulled if you go one level deeper to dt.entity.[service (or other entity type)], which requires many lines of code just to resolve a name to entity.id. 

https://community.dynatrace.com/t5/DQL/Changing-affected-entity-ids-for-entity-name/m-p/225729#:~:te...

fetch events
| filter event.kind == "DAVIS_PROBLEM"
|expand affected_entity_ids
|lookup sourceField:affected_entity_ids, lookupField:id, prefix:"service.", [
fetch dt.entity.service | fields id, name = entity.name]
|lookup sourceField:affected_entity_ids, lookupField:id, prefix:"http.", [
fetch dt.entity.http_check | fields id, name = entity.name]
|lookup sourceField:affected_entity_ids, lookupField:id, prefix:"process.", [
fetch dt.entity.process_group_instance | fields id, name = entity.name]
|lookup sourceField:affected_entity_ids, lookupField:id, prefix:"host.", [
fetch dt.entity.host| fields id, name = entity.name]
|lookup sourceField:affected_entity_ids, lookupField:id, prefix:"mobile.", [
fetch dt.entity.mobile_application | fields id, name = entity.name]
|fieldsAdd componente = array(host.name, http.name, mobile.name, process.name, service.name)
|summarize by:{`Problema` = event.name, `Componente`= componente }, count = countDistinct(display_id)
|sort count, direction:"descending"

 

0 REPLIES 0

Featured Posts