# DQL

**URL:** https://community.dynatrace.com/c/platform/dql/83.md?page=15

[Latest](https://community.dynatrace.com/latest.md) · [Categories](https://community.dynatrace.com/categories.md) · [Tags](https://community.dynatrace.com/tags.md)

**Page:** 16

---

## [DQL to get process group for specific set of hosts](https://community.dynatrace.com/t/dql-to-get-process-group-for-specific-set-of-hosts/44729)

<div class="topic-metadata">

**Author:** [@AK](https://community.dynatrace.com/u/AK)\
**Replies:** 4\
**Last updated:** [April 1, 2025, 7:45pm UTC](https://community.dynatrace.com/t/dql-to-get-process-group-for-specific-set-of-hosts/44729 "2025-04-01T19:45:08Z")

</div>

I need help to get process group for specific set of hosts using DQL. Has anyone extracted it successfully? Regards, AK

---

## [DQL  combine values from two fields](https://community.dynatrace.com/t/dql-combine-values-from-two-fields/50981)

<div class="topic-metadata">

**Author:** [@stevene1900](https://community.dynatrace.com/u/stevene1900)\
**Replies:** 3\
**Last updated:** [April 1, 2025, 4:13pm UTC](https://community.dynatrace.com/t/dql-combine-values-from-two-fields/50981 "2025-04-01T16:13:30Z")

</div>

How can I create new field called total\_count which is the sum of values “processed” and “errors”: fields processed = if(isNull(arraySum(processed)),0.00,else:arraySum(processed)), errors = if(isNull(arraySum(…

---

## [Apply variable values in filter with entitySelector](https://community.dynatrace.com/t/apply-variable-values-in-filter-with-entityselector/40707)

<div class="topic-metadata">

**Author:** [@elenaperez](https://community.dynatrace.com/u/elenaperez)\
**Replies:** 10\
**Last updated:** [March 28, 2025, 1:27pm UTC](https://community.dynatrace.com/t/apply-variable-values-in-filter-with-entityselector/40707 "2025-03-28T13:27:39Z")

</div>

I have the following query on a dashboard: timeseries cpu=avg(dt.host.cpu.usage), filter:in(dt.entity.host,entitySelector(“type(host),tag(Environment:DEV)”)),by:dt.entity.host | sort arrayAvg(cpu), direction:“descendin…

---

## [Query Kuberentes workloads](https://community.dynatrace.com/t/query-kuberentes-workloads/48030)

<div class="topic-metadata">

**Author:** [@DamianJankowski](https://community.dynatrace.com/u/DamianJankowski)\
**Replies:** 10\
**Last updated:** [March 28, 2025, 6:16am UTC](https://community.dynatrace.com/t/query-kuberentes-workloads/48030 "2025-03-28T06:16:07Z")

</div>

Hi, Could you please help me better understand how to query entities and the relationships between them? fetch dt.entity.service | filter in(id, classicEntitySelector(“type(service),fromRelationship.isServiceOf(type(C…

---

## [Custom conditions in Workflows](https://community.dynatrace.com/t/custom-conditions-in-workflows/50900)

<div class="topic-metadata">

**Author:** [@Pablo2](https://community.dynatrace.com/u/Pablo2)\
**Replies:** 1\
**Last updated:** [March 27, 2025, 11:12pm UTC](https://community.dynatrace.com/t/custom-conditions-in-workflows/50900 "2025-03-27T23:12:29Z")

</div>

I have a workflow that executes the following DQL: I want a custom condition so that only when status1 is = 1 , the next step is done. From what I have seen in the documentation this syntax would be correct but it d…

---

## [Dashboard filter with multi-select: filtering on multiple possible tags](https://community.dynatrace.com/t/dashboard-filter-with-multi-select-filtering-on-multiple-possible-tags/46361)

<div class="topic-metadata">

**Author:** [@aled](https://community.dynatrace.com/u/aled)\
**Replies:** 6\
**Last updated:** [March 27, 2025, 2:16pm UTC](https://community.dynatrace.com/t/dashboard-filter-with-multi-select-filtering-on-multiple-possible-tags/46361 "2025-03-27T14:16:02Z")

</div>

I have a variable definition working fine, that spits out possible values for a specific tag on my AWS SQS queues: fetch \`dt.entity.cloud\<img class="lia-deferred-image lia-image-emoji" src="https://community.dynatrace.c…

---

## [Filter Events or Time-Series by Array Contents Using DQL](https://community.dynatrace.com/t/filter-events-or-time-series-by-array-contents-using-dql/50835)

<div class="topic-metadata">

**Author:** [@Landho](https://community.dynatrace.com/u/Landho)\
**Replies:** 5\
**Last updated:** [March 27, 2025, 4:16am UTC](https://community.dynatrace.com/t/filter-events-or-time-series-by-array-contents-using-dql/50835 "2025-03-27T04:16:14Z")

</div>

Hello - new to DT and just deploying it. So far I am struggling to fully mature my DQL savvy - so this question is my first. I’m trying to setup dashboard filters to filer by Data Center. I already have the dashboard…

---

## [Search for Matches in Arrays Using Dynatrace DQL](https://community.dynatrace.com/t/search-for-matches-in-arrays-using-dynatrace-dql/50863)

<div class="topic-metadata">

**Author:** [@triptisharma](https://community.dynatrace.com/u/triptisharma)\
**Replies:** 5\
**Last updated:** [March 25, 2025, 2:29pm UTC](https://community.dynatrace.com/t/search-for-matches-in-arrays-using-dynatrace-dql/50863 "2025-03-25T14:29:27Z")

</div>

Summary: This post explains how to use DQL to find matches within arrays of values. It includes syntax examples and tips for efficient query building in Dynatrace dashboards. Dear Community Members, I was looking to im…

---

## [Regex in DQL](https://community.dynatrace.com/t/regex-in-dql/50876)

<div class="topic-metadata">

**Author:** [@Frazzle](https://community.dynatrace.com/u/Frazzle)\
**Replies:** 1\
**Last updated:** [March 25, 2025, 1:35pm UTC](https://community.dynatrace.com/t/regex-in-dql/50876 "2025-03-25T13:35:47Z")

</div>

Is it possible to filter a contents of a log for a particular set of letters using regex? Example is that we are looking for any contents that have EX\*\*\*\*S where the \* are random numbers. MatchesPhrase does not work e…

---

## [Workflow (ERROR DQL)](https://community.dynatrace.com/t/workflow-error-dql/50871)

<div class="topic-metadata">

**Author:** [@Pablo2](https://community.dynatrace.com/u/Pablo2)\
**Replies:** 2\
**Last updated:** [March 25, 2025, 11:22am UTC](https://community.dynatrace.com/t/workflow-error-dql/50871 "2025-03-25T11:22:58Z")

</div>

I’m trying to create a workflow to raise an issue in Dynatrace when a number of machines are turned off. I have the following DQL that works perfectly on the notebooks, but when I pass it to a workflow, it gives me an er…

---

## [Assign Multiple Variables in DQL Queries Following Best Practices](https://community.dynatrace.com/t/assign-multiple-variables-in-dql-queries-following-best-practices/50816)

<div class="topic-metadata">

**Author:** [@Moonrox](https://community.dynatrace.com/u/Moonrox)\
**Replies:** 1\
**Last updated:** [March 24, 2025, 10:51pm UTC](https://community.dynatrace.com/t/assign-multiple-variables-in-dql-queries-following-best-practices/50816 "2025-03-24T22:51:37Z")

</div>

I am working on a DQL query to gather and store 2 variables and then create a trending variable.Please advise if this is the best way to solve this problem.// Fetch Active problems from the last 7 daysfetch dt.davis.prob…

---

## [Fetch Non-Key Service Method Attributes Using DQL](https://community.dynatrace.com/t/fetch-non-key-service-method-attributes-using-dql/50847)

<div class="topic-metadata">

**Author:** [@waikeat\_chan](https://community.dynatrace.com/u/waikeat_chan)\
**Replies:** 1\
**Last updated:** [March 23, 2025, 5:02pm UTC](https://community.dynatrace.com/t/fetch-non-key-service-method-attributes-using-dql/50847 "2025-03-23T17:02:59Z")

</div>

Correct me if I am wrong, but it seems like dt.entity.service\_method can only return request/endpoint of those that marked as key request only. Is this right? If yes, anyone has any workaround (be it DQL of non-DQL) tha…

---

## [Transform "There are no records" into 0 with DQL](https://community.dynatrace.com/t/transform-there-are-no-records-into-0-with-dql/49858)

<div class="topic-metadata">

**Author:** [@elenaperez](https://community.dynatrace.com/u/elenaperez)\
**Replies:** 2\
**Last updated:** [March 20, 2025, 5:01pm UTC](https://community.dynatrace.com/t/transform-there-are-no-records-into-0-with-dql/49858 "2025-03-20T17:01:32Z")

</div>

Hi, I am trying to transform the message “There are no records” in my tile to a single 0 (or an array of zeros). I have tried using union:true, nonempty:true, and the coalesce function but none of them seem to work. I …

---

## [Time difference DQL](https://community.dynatrace.com/t/time-difference-dql/50750)

<div class="topic-metadata">

**Author:** [@RAKESHNREDDY](https://community.dynatrace.com/u/RAKESHNREDDY)\
**Replies:** 3\
**Last updated:** [March 19, 2025, 11:52pm UTC](https://community.dynatrace.com/t/time-difference-dql/50750 "2025-03-19T23:52:02Z")

</div>

Hello Everyone, Good day, I have a requirement to calculate the time difference between the minimum and first maximum points for all the available data within the timeframe selected. In this example, the time taken for…

---

## [DQL Query timeout.](https://community.dynatrace.com/t/dql-query-timeout/50778)

<div class="topic-metadata">

**Author:** [@RAKESHNREDDY](https://community.dynatrace.com/u/RAKESHNREDDY)\
**Replies:** 1\
**Last updated:** [March 19, 2025, 11:32pm UTC](https://community.dynatrace.com/t/dql-query-timeout/50778 "2025-03-19T23:32:51Z")

</div>

Hello Everyone, I have a complex query, which is a combination of 3 independent queries. All the independent queries work within the time limit. When I try to combine them in DQL, it gives ‘Query timeout ERROR’. Is ther…

---

## [RUM in DQL/Grail](https://community.dynatrace.com/t/rum-in-dql-grail/43547)

<div class="topic-metadata">

**Author:** [@gbaudart](https://community.dynatrace.com/u/gbaudart)\
**Replies:** 8\
**Last updated:** [March 19, 2025, 10:42am UTC](https://community.dynatrace.com/t/rum-in-dql-grail/43547 "2025-03-19T10:42:42Z")

</div>

Hello Community, Does anyone know when we will be able to natively retrieve RUM data with DQL queries? (without going through “dynatrace-sdk/client-classic-environment”)

---

## [Parse out the last word in a string](https://community.dynatrace.com/t/parse-out-the-last-word-in-a-string/50768)

<div class="topic-metadata">

**Author:** [@pieter\_luttig](https://community.dynatrace.com/u/pieter_luttig)\
**Replies:** 14\
**Last updated:** [March 19, 2025, 9:51am UTC](https://community.dynatrace.com/t/parse-out-the-last-word-in-a-string/50768 "2025-03-19T09:51:36Z")

</div>

Does anyone know if it is possible to parse out the last word in a string? (The word can differ) The DPL reference does not mention this anywhere. Regards Pieter

---

## [Get metric host.net.nic.connectivity in Notebook](https://community.dynatrace.com/t/get-metric-host-net-nic-connectivity-in-notebook/50734)

<div class="topic-metadata">

**Author:** [@danijela](https://community.dynatrace.com/u/danijela)\
**Replies:** 3\
**Last updated:** [March 17, 2025, 7:39am UTC](https://community.dynatrace.com/t/get-metric-host-net-nic-connectivity-in-notebook/50734 "2025-03-17T07:39:48Z")

</div>

Hello, Currently this metric: host.net.nic.connectivity is only available in data Explorer. I need this metric to get the report on a daily basis, but considering the limitations I am not able to do it

---

## [Field with only a certain key:value tag using DQL](https://community.dynatrace.com/t/field-with-only-a-certain-key-value-tag-using-dql/50677)

<div class="topic-metadata">

**Author:** [@Himavanth\_Reddy](https://community.dynatrace.com/u/Himavanth_Reddy)\
**Replies:** 4\
**Last updated:** [March 12, 2025, 2:59pm UTC](https://community.dynatrace.com/t/field-with-only-a-certain-key-value-tag-using-dql/50677 "2025-03-12T14:59:12Z")

</div>

I want to get a field with only a certain key:value tag using DQL. example: Host Name | Host group name | Datacentre:xyz this Datacentre tag is already defined in my environment. How to achieve it?

---

## [Handle Tag Values in Dynatrace Query Language (DQL)](https://community.dynatrace.com/t/handle-tag-values-in-dynatrace-query-language-dql/40061)

<div class="topic-metadata">

**Author:** [@paolo\_fumanelli](https://community.dynatrace.com/u/paolo_fumanelli)\
**Replies:** 9\
**Last updated:** [March 12, 2025, 12:53pm UTC](https://community.dynatrace.com/t/handle-tag-values-in-dynatrace-query-language-dql/40061 "2025-03-12T12:53:46Z")

</div>

Summary: This article demonstrates how to handle tag values in DQL queries, including syntax examples and practical use cases for filtering and grouping data in Dynatrace dashboards. Hi, I defined some tags in the key:v…

---

## [Not sure how to dpl this line](https://community.dynatrace.com/t/not-sure-how-to-dpl-this-line/50667)

<div class="topic-metadata">

**Author:** [@vm\_molson](https://community.dynatrace.com/u/vm_molson)\
**Replies:** 1\
**Last updated:** [March 11, 2025, 9:18pm UTC](https://community.dynatrace.com/t/not-sure-how-to-dpl-this-line/50667 "2025-03-11T21:18:54Z")

</div>

I’m very new and used to working with RegEx. We’re switching over to DT now and I used to be able (in our other tool) pull the application version of one of our monitored applications with RegEx. I’ve been trying to use…

---

## [DQL to Get specific process in availability monitoring on multiple Host](https://community.dynatrace.com/t/dql-to-get-specific-process-in-availability-monitoring-on-multiple-host/49934)

<div class="topic-metadata">

**Author:** [@Dest-Roh](https://community.dynatrace.com/u/Dest-Roh)\
**Replies:** 1\
**Last updated:** [March 11, 2025, 12:17pm UTC](https://community.dynatrace.com/t/dql-to-get-specific-process-in-availability-monitoring-on-multiple-host/49934 "2025-03-11T12:17:06Z")

</div>

Hi Team, I have a requirement to pull down a specific process kept in availability monitoring on my environment and wanted to generate a report and gather info that on which machine availability monitoring is enabled fo…

---

## [Get logfile name](https://community.dynatrace.com/t/get-logfile-name/47851)

<div class="topic-metadata">

**Author:** [@mferstl](https://community.dynatrace.com/u/mferstl)\
**Replies:** 4\
**Last updated:** [March 11, 2025, 8:25am UTC](https://community.dynatrace.com/t/get-logfile-name/47851 "2025-03-11T08:25:23Z")

</div>

We are using grail and i am using a folder with different files as the logsource and would like to be able to get the filename in each logfileline, is that possbile?

---

## [Summarize Array Entries by Maximum Value per Key Using Dynatrace DQL](https://community.dynatrace.com/t/summarize-array-entries-by-maximum-value-per-key-using-dynatrace-dql/50636)

<div class="topic-metadata">

**Author:** [@joostm](https://community.dynatrace.com/u/joostm)\
**Replies:** 1\
**Last updated:** [March 10, 2025, 12:11pm UTC](https://community.dynatrace.com/t/summarize-array-entries-by-maximum-value-per-key-using-dynatrace-dql/50636 "2025-03-10T12:11:21Z")

</div>

Summary: This post explains how to use DQL to summarize multiple array elements by picking the maximum value for each matching key. It provides example queries and discusses data‑structuring considerations. I have a dat…

---

## [Is there any way to access to the result of any previous task in Workflow using DQL instead of JS code?](https://community.dynatrace.com/t/is-there-any-way-to-access-to-the-result-of-any-previous-task-in-workflow-using-dql-instead-of-js-code/50608)

<div class="topic-metadata">

**Author:** [@waikeat\_chan](https://community.dynatrace.com/u/waikeat_chan)\
**Replies:** 1\
**Last updated:** [March 7, 2025, 8:48pm UTC](https://community.dynatrace.com/t/is-there-any-way-to-access-to-the-result-of-any-previous-task-in-workflow-using-dql-instead-of-js-code/50608 "2025-03-07T20:48:38Z")

</div>

Just to give an example of what I encountered, I have a simple workflow below consists of task\_1 and task\_2. You can see that in task\_1 the DQL return a single record: What I want to do in task\_2, is to run another …

---

## [Database page shows only databases detected by OneAgent? Or only databases monitored using extension?](https://community.dynatrace.com/t/database-page-shows-only-databases-detected-by-oneagent-or-only-databases-monitored-using-extension/50609)

<div class="topic-metadata">

**Author:** [@waikeat\_chan](https://community.dynatrace.com/u/waikeat_chan)\
**Replies:** 1\
**Last updated:** [March 7, 2025, 8:33pm UTC](https://community.dynatrace.com/t/database-page-shows-only-databases-detected-by-oneagent-or-only-databases-monitored-using-extension/50609 "2025-03-07T20:33:16Z")

</div>

The database page that is on SaaS Grail, it shows only those detected by OneAgent? Or only those monitored using extension? Or is it both?

---

## [Get List of Servers Recently Added](https://community.dynatrace.com/t/get-list-of-servers-recently-added/50562)

<div class="topic-metadata">

**Author:** [@t\_thi](https://community.dynatrace.com/u/t_thi)\
**Replies:** 2\
**Last updated:** [March 7, 2025, 9:25am UTC](https://community.dynatrace.com/t/get-list-of-servers-recently-added/50562 "2025-03-07T09:25:14Z")

</div>

Hi all, Fairly useless with DQL, so wondering if anyone know how we can grab a list of servers which have recently had OneAgent installed. This is something we can see in Deployment Status App, but I can’t open it in ot…

---

## [How to subtract arrays in DQL?](https://community.dynatrace.com/t/how-to-subtract-arrays-in-dql/50457)

<div class="topic-metadata">

**Author:** [@bretonne](https://community.dynatrace.com/u/bretonne)\
**Replies:** 1\
**Last updated:** [February 28, 2025, 8:27am UTC](https://community.dynatrace.com/t/how-to-subtract-arrays-in-dql/50457 "2025-02-28T08:27:59Z")

</div>

I want to find out the diff between two arrays and list them out with DQL. Something like | fields array1, array2, diff Diff needs to be calculated but not sure how to do that. Here I have array 1 = \[“apple”, “orange…

---

## [DQL Monthly Query for problems](https://community.dynatrace.com/t/dql-monthly-query-for-problems/50494)

<div class="topic-metadata">

**Author:** [@Eyad](https://community.dynatrace.com/u/Eyad)\
**Replies:** 3\
**Last updated:** [February 28, 2025, 8:18am UTC](https://community.dynatrace.com/t/dql-monthly-query-for-problems/50494 "2025-02-28T08:18:37Z")

</div>

hi all, i am trying to do Monthly Problem Count and ServiceNow Ticket Count Over the Last 4 Months in one tile. fetch dt.davis.problems | summarize TotalProblemMonthly=count(), by:{Month = formatTimestamp(timestamp, fo…

---

## [Unable to convert event.start from fetch bizevents into timestamp using timestampFromUnixNanos](https://community.dynatrace.com/t/unable-to-convert-event-start-from-fetch-bizevents-into-timestamp-using-timestampfromunixnanos/50488)

<div class="topic-metadata">

**Author:** [@AlanFoley](https://community.dynatrace.com/u/AlanFoley)\
**Replies:** 2\
**Last updated:** [February 28, 2025, 4:59am UTC](https://community.dynatrace.com/t/unable-to-convert-event-start-from-fetch-bizevents-into-timestamp-using-timestampfromunixnanos/50488 "2025-02-28T04:59:45Z")

</div>

Hi All I have this DQL which produces the desired output: fetch bizevents | filter event.type == “cost.list.spend” | lookup \[fetch dt.entity.host | fieldsAdd entity.name,osArchitecture,osType\],sourceField:dt.entity.h…

[Previous page](https://community.dynatrace.com/c/platform/dql/83.md?page=14)

[Next page](https://community.dynatrace.com/c/platform/dql/83.md?page=16)
