04 Feb 2025 02:59 PM
Hi all!
I have a dashboard where I want to fetch all the active problems and group the problems together by application. Then, using a variable that sorts through applications, I want to use that variable as a multi-select filter.
However, when I fetch active problems, I don't see any category that groups together problems by application. I see options to group by alerting_profile, display_id, affected_entity_id, etc..., but nothing to group by app.
Is there any way to sort through the list of active problems and group them together by application?
04 Feb 2025 07:18 PM - edited 04 Feb 2025 07:23 PM
Just to clarify, what do you mean by application? Do you mean Dynatrace Application (RUM)? If you mean RUM app you could try something like this:
fetch dt.davis.problems
| expand affected_entity_types
| filter affected_entity_types == "dt.entity.application"
| dedup display_id
To get all of the problems related to your DT RUM applications
05 Feb 2025 07:38 PM - edited 05 Feb 2025 07:43 PM
Hey, thanks for the response David.
By "application", I mean the applications at our firm that we have OneAgent installed on (Salesforce, Docusign, etc...).
I want to get the total number of problems per application (or even management zone). However, when I fetch Davis problems, I don't see any options (columns) that allow me to filter by application (or anything even remotely close).
| fetch dt.davis.problems
| expand affected_entity_types
When I run this, none of the columns signify the application that the problem occurs on. When I run your DQL query, I don't see the actual names of apps, just whether or not the problem occurred on an application, host, server, etc.
06 Feb 2025 04:18 AM
Heya,
You can filter by entity_ids like this.
fetch dt.davis.problems
| expand affected_entity_ids
| summarize count(), by: affected_entity_ids
however, if you want application names instead of ids then it would be complex one as the DQL will only allow fetching entities by their type and get their name like you can get an application name by using a query like this
fetch dt.entity.application
| filter id == "APPLICATION-<ALPHA-NUMERIC-ID>"
| fields entity.name
Since you mentioned you are using dashboard itself, I'd suggest use the query1 as a variable and write a JS code that would fetch the entity.name by the entity id.
Refer this on how you can write JS code DQL Query | Dynatrace Developer
Hope this helps..
Regards,
Maheedhar.
07 Feb 2025 02:36 PM
Hi Maheedhar, thanks for the response.
When you say:
| filter id == "APPLICATION-<ALPHA-NUMERIC-ID>"
What does ALPHA-NUMERIC-ID refer to? Is that the display ID of the problem? Like, P-12345?