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

Filtering events by Management Zone, Gen3 Dynatrace Dashboard.

Ahmedrahbi
Observer

Hello, Dynatrace Community!

I’m working with Gen3 DQL and trying to filter events based on a specific management zone, specifically for the “xxxx” management zone. I attempted the query in Gen3, and I’m attaching a screenshot of my code for reference.

However, I’ve noticed a discrepancy: when I apply the management zone filter in the older DQL version, the results differ from what I’m getting in Gen3 DQL. This leads to the following questions:

1. What is the correct DQL syntax for Gen3 dashboards to properly filter by management zone?
2. How should I modify my query to ensure that only events associated with the “xxx” management zone are displayed?

 

 

 

 

fetch events
| filter event.kind == "DAVIS_PROBLEM"
| sort timestamp desc
| lookup [ 
      fetch dt.entity.host
      | expand managementZones
    ], sourceField:effected_entity_ids, lookupField:id, prefix:"mzone."
| summarize {status = takeFirst(event.status),
            event.name = takeFirst(event.name),
            severityLevel = takeFirst(event.category),
            managmentzone = takeFirst(affected_entities.management_zones.names
          ),
            affected = takeFirst(affected_entity_ids)},
            by:{display_id}
| fieldsAdd Status = if((status == "ACTIVE")," OPEN",
                  else:if((status == "CLOSED"),"🟢 CLOSED"))

| fields Status, display_id, event.name,affected, severityLevel, managmentzone

 

 

 

 

 

 

Thank you for your help! 

ahmed alrahbi 😊

 

2 REPLIES 2

MaciejNeumann
Community Team
Community Team

Hello @Ahmedrahbi,

Could you check out this reply in another thread from @sinisa_zubic?
Fetch active problems 
You'll find the answer there on how to fetch and filter out events in the query, which may help with your use case

If you have any questions about the Community, you can contact me at maciej.neumann@dynatrace.com

sinisa_zubic
Dynatrace Champion
Dynatrace Champion

Hi @Ahmedrahbi 

To filter data in Dashboards you should use segments . Please not that the feature is currently "In Preview" and there might be still changes happening to the feature.

 

Best,
Sini

Featured Posts