# DQL

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

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

**Page:** 12

---

## [Is it possible to add multiple fields as sourceField for lookup to work in DQL?](https://community.dynatrace.com/t/is-it-possible-to-add-multiple-fields-as-sourcefield-for-lookup-to-work-in-dql/52617)

<div class="topic-metadata">

**Author:** [@virdavindersing](https://community.dynatrace.com/u/virdavindersing)\
**Replies:** 5\
**Last updated:** [July 28, 2025, 7:10pm UTC](https://community.dynatrace.com/t/is-it-possible-to-add-multiple-fields-as-sourcefield-for-lookup-to-work-in-dql/52617 "2025-07-28T19:10:08Z")

</div>

Here’s the query fetch spans | filter dt.system.bucket == “default\_spans” AND matchesValue(entityAttr(dt.entity.kubernetes\_cluster, “entity.name”), “cluster\_name”) AND NOT (matchesPhrase(endpoint.name, “\*liveness\*”) …

---

## [Possibility of Joining Lookup Data with External CSV in DQL](https://community.dynatrace.com/t/possibility-of-joining-lookup-data-with-external-csv-in-dql/51429)

<div class="topic-metadata">

**Author:** [@Akhil-Jayendran](https://community.dynatrace.com/u/Akhil-Jayendran)\
**Replies:** 6\
**Last updated:** [July 28, 2025, 5:22pm UTC](https://community.dynatrace.com/t/possibility-of-joining-lookup-data-with-external-csv-in-dql/51429 "2025-07-28T17:22:09Z")

</div>

Hello All, Is it possible to join data from a lookup and retrieve details from an external CSV file using DQL, or elsewhere within a dashboard? Regards, Akhil

---

## [makeTimeSeries](https://community.dynatrace.com/t/maketimeseries/52668)

<div class="topic-metadata">

**Author:** [@dynacondused](https://community.dynatrace.com/u/dynacondused)\
**Replies:** 1\
**Last updated:** [July 28, 2025, 4:42pm UTC](https://community.dynatrace.com/t/maketimeseries/52668 "2025-07-28T16:42:33Z")

</div>

Hi, trying to use makeTimeSeries but it doesn’t seem to allow the success field I added below fetch bizevents | filter eventType == “my-event” | makeTimeseries { started = countDistinct(if(pathname == “/starte…

---

## [Data Explorer advance query mode](https://community.dynatrace.com/t/data-explorer-advance-query-mode/52584)

<div class="topic-metadata">

**Author:** [@Vijayt](https://community.dynatrace.com/u/Vijayt)\
**Replies:** 5\
**Last updated:** [July 27, 2025, 8:10am UTC](https://community.dynatrace.com/t/data-explorer-advance-query-mode/52584 "2025-07-27T08:10:55Z")

</div>

I want to extract the hostname that has exceeded 40% memory max in a 30-minute interval in the last 24 hours. How can we achieve this via a nested query, filter the series value to max (40)?

---

## [DQL for Anomaly Detector to compare multiple metrics and trigger alert](https://community.dynatrace.com/t/dql-for-anomaly-detector-to-compare-multiple-metrics-and-trigger-alert/51851)

<div class="topic-metadata">

**Author:** [@p\_devulapalli](https://community.dynatrace.com/u/p_devulapalli)\
**Replies:** 3\
**Last updated:** [July 24, 2025, 11:57am UTC](https://community.dynatrace.com/t/dql-for-anomaly-detector-to-compare-multiple-metrics-and-trigger-alert/51851 "2025-07-24T11:57:22Z")

</div>

I am trying to trigger an alert using anomaly detector by looking at multiple metrics . As an example when dt.host.disk.avail is less than 100GB and dt.host.disk.free is less than 10% . Both the condition should match t…

---

## [Parse log data that contains \\n (newline)](https://community.dynatrace.com/t/parse-log-data-that-contains-n-newline/52497)

<div class="topic-metadata">

**Author:** [@avdveen](https://community.dynatrace.com/u/avdveen)\
**Replies:** 14\
**Last updated:** [July 24, 2025, 6:36am UTC](https://community.dynatrace.com/t/parse-log-data-that-contains-n-newline/52497 "2025-07-24T06:36:08Z")

</div>

Hi, I’ve been struggling with the DQL processor definition syntax and just not winning…any suggestions on how to parse the items and their respective values for all the ‘Order’ items in the “message” part of this log? {…

---

## [Calculate Duration from Specific Fields Using DQL](https://community.dynatrace.com/t/calculate-duration-from-specific-fields-using-dql/52602)

<div class="topic-metadata">

**Author:** [@goutham\_a](https://community.dynatrace.com/u/goutham_a)\
**Replies:** 1\
**Last updated:** [July 23, 2025, 2:04am UTC](https://community.dynatrace.com/t/calculate-duration-from-specific-fields-using-dql/52602 "2025-07-23T02:04:09Z")

</div>

Calculate Duration from fields (StartTime and EndTime) and display the start date Task StartDate EndDate StartTime EndTime A 7/21/2025 7/21/2025 23:00:01 23:09:24 B 7/22/2025 7/22/2025 00:59:53 01:24:01 Nee…

---

## [makeTimeseries for error rate calculated from fetching spans](https://community.dynatrace.com/t/maketimeseries-for-error-rate-calculated-from-fetching-spans/52011)

<div class="topic-metadata">

**Author:** [@virdavindersing](https://community.dynatrace.com/u/virdavindersing)\
**Replies:** 6\
**Last updated:** [July 22, 2025, 1:15pm UTC](https://community.dynatrace.com/t/maketimeseries-for-error-rate-calculated-from-fetching-spans/52011 "2025-07-22T13:15:02Z")

</div>

Below Is the query to fetch spans and calculate error rate fetch spans | filter matchesValue(entityAttr(dt.entity.kubernetes\_cluster, “entity.name”), “fin-iac-rel-tnl-atm-pr”) AND matchesValue(k8s.namespace.name, $Tena…

---

## [DQL - timeseries on a dashboard with different timeseries data being shown depending on variable selection](https://community.dynatrace.com/t/dql-timeseries-on-a-dashboard-with-different-timeseries-data-being-shown-depending-on-variable-selection/52551)

<div class="topic-metadata">

**Author:** [@CSBee](https://community.dynatrace.com/u/CSBee)\
**Replies:** 2\
**Last updated:** [July 22, 2025, 8:27am UTC](https://community.dynatrace.com/t/dql-timeseries-on-a-dashboard-with-different-timeseries-data-being-shown-depending-on-variable-selection/52551 "2025-07-22T08:27:51Z")

</div>

Hello, I am having issues with a Dashboard / DQL query. I have a variable on my dashboard called $Measurement and depending on what that shows I either want to see timeseries data for P90 or Average on my graph. I have…

---

## [Use Rate and Bin Functions in DQL Time-Series Queries](https://community.dynatrace.com/t/use-rate-and-bin-functions-in-dql-time-series-queries/52540)

<div class="topic-metadata">

**Author:** [@Akhil-Jayendran](https://community.dynatrace.com/u/Akhil-Jayendran)\
**Replies:** 2\
**Last updated:** [July 21, 2025, 11:44pm UTC](https://community.dynatrace.com/t/use-rate-and-bin-functions-in-dql-time-series-queries/52540 "2025-07-21T23:44:51Z")

</div>

Hello Community, I am in the process of understanding the use case of bins and the rate function in the timeseries command. I wrote a small script that sends a random whole number as a custom metric into Dynatrace ever…

---

## [DPL extract single value and compare](https://community.dynatrace.com/t/dpl-extract-single-value-and-compare/52558)

<div class="topic-metadata">

**Author:** [@almog50](https://community.dynatrace.com/u/almog50)\
**Replies:** 1\
**Last updated:** [July 21, 2025, 4:17pm UTC](https://community.dynatrace.com/t/dpl-extract-single-value-and-compare/52558 "2025-07-21T16:17:36Z")

</div>

Hi, I have the following content: 2025-07-20T06:00:38.027Z INFO 1 --- \[db-monitor\] \[ main\] c.d.i.d.util.DbMonitorCommandLineRunner : Outbox monitor results for destination sql - SELECT COUNT(DISTINCT produ…

---

## [DQL timeseries: aggregate data based on lookup fields](https://community.dynatrace.com/t/dql-timeseries-aggregate-data-based-on-lookup-fields/41206)

<div class="topic-metadata">

**Author:** [@Adrien\_Z](https://community.dynatrace.com/u/Adrien_Z)\
**Replies:** 11\
**Last updated:** [July 18, 2025, 2:51pm UTC](https://community.dynatrace.com/t/dql-timeseries-aggregate-data-based-on-lookup-fields/41206 "2025-07-18T14:51:23Z")

</div>

Hello, I’m trying to group a timeseries based on new fields I fetch after a lookup. So basically, I’m fetching a timeseries (here dt.kubernetes.node\_conditions). Then, I lookup the kubernetes nodes to get a specific la…

---

## [Is user session information already available in Grail?](https://community.dynatrace.com/t/is-user-session-information-already-available-in-grail/52517)

<div class="topic-metadata">

**Author:** [@Jorge3229](https://community.dynatrace.com/u/Jorge3229)\
**Replies:** 2\
**Last updated:** [July 17, 2025, 11:54pm UTC](https://community.dynatrace.com/t/is-user-session-information-already-available-in-grail/52517 "2025-07-17T23:54:16Z")

</div>

Hello everyone, good afternoon. I’d like to ask if you know if it’s possible to query user session information from Grail? Running the fetch command, I see that user.sessions exists in the suggestions, and I tried to re…

---

## [unable to extract json from logs and parse it](https://community.dynatrace.com/t/unable-to-extract-json-from-logs-and-parse-it/52511)

<div class="topic-metadata">

**Author:** [@ramchandgadde](https://community.dynatrace.com/u/ramchandgadde)\
**Replies:** 7\
**Last updated:** [July 17, 2025, 11:49am UTC](https://community.dynatrace.com/t/unable-to-extract-json-from-logs-and-parse-it/52511 "2025-07-17T11:49:09Z")

</div>

Below is my DQL query and how to extract json and parse the json? Earlier I was using DQL parse command not fetching all data. data record(content=“\[INFO\]\[EAP\_WORKDAY\]\[DYNATRACE\] 2025-07-16 12:45:23.999 Merged\_Respon…

---

## [DQL parse issue](https://community.dynatrace.com/t/dql-parse-issue/52507)

<div class="topic-metadata">

**Author:** [@ramchandgadde](https://community.dynatrace.com/u/ramchandgadde)\
**Replies:** 1\
**Last updated:** [July 17, 2025, 7:25am UTC](https://community.dynatrace.com/t/dql-parse-issue/52507 "2025-07-17T07:25:29Z")

</div>

Below are details that I tried for fetching and building dashboard in Dynatrace. For DQL I am using parse option. The problem with it is , the parse function somehow is not fetching all rows. Do we have any other option…

---

## [add a timeseries field](https://community.dynatrace.com/t/add-a-timeseries-field/52501)

<div class="topic-metadata">

**Author:** [@khoros\_anonymous](https://community.dynatrace.com/u/khoros_anonymous)\
**Replies:** 3\
**Last updated:** [July 16, 2025, 12:00pm UTC](https://community.dynatrace.com/t/add-a-timeseries-field/52501 "2025-07-16T12:00:14Z")

</div>

Hi, Here is a simple dql example to ilustrate my issue timeseries test=avg(dt.host.cpu.usage), by:{dt.entity.host} | fieldsadd cpu\_state=if(arrayAvg(test)\>7,1,else:0) I would like to see history of cpu\_state, but I a…

---

## [Parse Unstructured Log Content While Skipping Newlines Using DQL](https://community.dynatrace.com/t/parse-unstructured-log-content-while-skipping-newlines-using-dql/52487)

<div class="topic-metadata">

**Author:** [@mpundang](https://community.dynatrace.com/u/mpundang)\
**Replies:** 1\
**Last updated:** [July 15, 2025, 11:06pm UTC](https://community.dynatrace.com/t/parse-unstructured-log-content-while-skipping-newlines-using-dql/52487 "2025-07-15T23:06:53Z")

</div>

Hi everyone, I have this log format in a Managed Cluster, with Log Classic, no Grail: "content": "last access : Wed May 22 11:32:42 ART 2025\\\\nmax inactive interval : 1800\\\\nuser name : anonymous\\\\nvalid session : true\\…

---

## [Host name in services running on host dql](https://community.dynatrace.com/t/host-name-in-services-running-on-host-dql/52156)

<div class="topic-metadata">

**Author:** [@Pablo2](https://community.dynatrace.com/u/Pablo2)\
**Replies:** 7\
**Last updated:** [July 15, 2025, 2:01pm UTC](https://community.dynatrace.com/t/host-name-in-services-running-on-host-dql/52156 "2025-07-15T14:01:21Z")

</div>

I have a dql that relates me the services and the hosts on which it is running, but it only gives me the id of the hosts and I would like to have the name of the host instead of the id. This is the dql: fetch dt.entity…

---

## [Need help with Dynatrace query](https://community.dynatrace.com/t/need-help-with-dynatrace-query/52454)

<div class="topic-metadata">

**Author:** [@ramchandgadde](https://community.dynatrace.com/u/ramchandgadde)\
**Replies:** 2\
**Last updated:** [July 11, 2025, 10:55pm UTC](https://community.dynatrace.com/t/need-help-with-dynatrace-query/52454 "2025-07-11T22:55:58Z")

</div>

I am struggling to extract Process, Process\_Type and Status from below Dynatrace query. Could you please help. data record(content=“\[INFO\]\[WORKDAY\]\[DYNATRACE\] 2025-07-11 17:00:10.696 Integration\_Activity\_API\_response {‘…

---

## [OS Service Availability showing no records](https://community.dynatrace.com/t/os-service-availability-showing-no-records/52453)

<div class="topic-metadata">

**Author:** [@Troy](https://community.dynatrace.com/u/Troy)\
**Replies:** 2\
**Last updated:** [July 11, 2025, 10:45pm UTC](https://community.dynatrace.com/t/os-service-availability-showing-no-records/52453 "2025-07-11T22:45:55Z")

</div>

Im trying to retrieve OS Services in our environment - using the example DQL from the documentation: here I get no results. Our OS Service monitoring is working as our monitors are alerting correctly but it would be…

---

## [Conditional Parsing](https://community.dynatrace.com/t/conditional-parsing/45729)

<div class="topic-metadata">

**Author:** [@mario\_rwwa](https://community.dynatrace.com/u/mario_rwwa)\
**Replies:** 3\
**Last updated:** [July 11, 2025, 7:03pm UTC](https://community.dynatrace.com/t/conditional-parsing/45729 "2025-07-11T19:03:28Z")

</div>

Currently I’m dealing with a logfile which outputs different data depending on the action which has occurred, one parse statement cannot handle all the options so I have multiple parse statements. I need to combine it a…

---

## [Show service name on DQL Query](https://community.dynatrace.com/t/show-service-name-on-dql-query/48367)

<div class="topic-metadata">

**Author:** [@soportetr](https://community.dynatrace.com/u/soportetr)\
**Replies:** 4\
**Last updated:** [July 11, 2025, 2:03am UTC](https://community.dynatrace.com/t/show-service-name-on-dql-query/48367 "2025-07-11T02:03:13Z")

</div>

Hi everyone, I am running a DQL query that shows which services call other services and which are called by another. Below I leave the query and the result: What I need to know is that if there is a way to show the …

---

## [listing the most consuming processes in terms of Network, CPU, Memory, Disk via DQL](https://community.dynatrace.com/t/listing-the-most-consuming-processes-in-terms-of-network-cpu-memory-disk-via-dql/52340)

<div class="topic-metadata">

**Author:** [@Peter\_Youssef](https://community.dynatrace.com/u/Peter_Youssef)\
**Replies:** 2\
**Last updated:** [July 11, 2025, 1:53am UTC](https://community.dynatrace.com/t/listing-the-most-consuming-processes-in-terms-of-network-cpu-memory-disk-via-dql/52340 "2025-07-11T01:53:04Z")

</div>

I need a custom query to fetch the most consuming processes in terms of: Network utilization Memory CPU Disk also splitting by each host to pinpoint directly to the most saturated hosts. Thanks.

---

## [Saving output to .csv from DQL - different behaviour this week - underlying numerical data not downloaded](https://community.dynatrace.com/t/saving-output-to-csv-from-dql-different-behaviour-this-week-underlying-numerical-data-not-downloaded/51590)

<div class="topic-metadata">

**Author:** [@AlanFoley](https://community.dynatrace.com/u/AlanFoley)\
**Replies:** 3\
**Last updated:** [July 10, 2025, 7:18am UTC](https://community.dynatrace.com/t/saving-output-to-csv-from-dql-different-behaviour-this-week-underlying-numerical-data-not-downloaded/51590 "2025-07-10T07:18:42Z")

</div>

Hi Guys When downloading DQL output as .csv from a DQL query - As of this week I have noticed that the downloaded data is as per “DQL Output Presentation” instead os the underlying numerial data For example DiskUsedPer…

---

## [Fix DQL Query Issues When CPU Data Is Missing for Hosts](https://community.dynatrace.com/t/fix-dql-query-issues-when-cpu-data-is-missing-for-hosts/52339)

<div class="topic-metadata">

**Author:** [@VictorRuiz](https://community.dynatrace.com/u/VictorRuiz)\
**Replies:** 1\
**Last updated:** [July 9, 2025, 10:56pm UTC](https://community.dynatrace.com/t/fix-dql-query-issues-when-cpu-data-is-missing-for-hosts/52339 "2025-07-09T22:56:49Z")

</div>

Hi all, I am working on a Dynatrace dashboard and I need to get the average CPU consumption of the ProcessGroups instances associated to the selected service in a dashboard variable. I am using the following DQL script …

---

## [How to get max KEY:VALUE per event.id without using expand (JSON array)](https://community.dynatrace.com/t/how-to-get-max-key-value-per-event-id-without-using-expand-json-array/52323)

<div class="topic-metadata">

**Author:** [@tracegazer](https://community.dynatrace.com/u/tracegazer)\
**Replies:** 3\
**Last updated:** [July 9, 2025, 10:23pm UTC](https://community.dynatrace.com/t/how-to-get-max-key-value-per-event-id-without-using-expand-json-array/52323 "2025-07-09T22:23:03Z")

</div>

Hi everyone, I’m working with Business Events in Dynatrace and facing an issue I can’t solve. I have a string field named rs.body\_result that contains a JSON\_ARRAY of objects. Each object includes a broadcast\_time key (…

---

## [Assistance Required for Formatting DQL Query Results in Email](https://community.dynatrace.com/t/assistance-required-for-formatting-dql-query-results-in-email/52112)

<div class="topic-metadata">

**Author:** [@aninda](https://community.dynatrace.com/u/aninda)\
**Replies:** 5\
**Last updated:** [July 9, 2025, 9:25pm UTC](https://community.dynatrace.com/t/assistance-required-for-formatting-dql-query-results-in-email/52112 "2025-07-09T21:25:28Z")

</div>

Hello Team, I am currently working on sending the results of a DQL query via email. For this purpose, I have created the following workflow: The workflow is functioning as expected, and the emails are being received…

---

## [Explore Practical DQL Use Cases for Advanced Observability](https://community.dynatrace.com/t/explore-practical-dql-use-cases-for-advanced-observability/52416)

<div class="topic-metadata">

**Author:** [@Peter\_Youssef](https://community.dynatrace.com/u/Peter_Youssef)\
**Replies:** 2\
**Last updated:** [July 9, 2025, 12:22pm UTC](https://community.dynatrace.com/t/explore-practical-dql-use-cases-for-advanced-observability/52416 "2025-07-09T12:22:05Z")

</div>

Dear Community Members, Thanks to the Dynatrace documentations and university. I’d appreciate providing practical use cases for better understanding and ease of application. KR, Peter

---

## [Calculate Average of Time-Shifted Metrics in Dynatrace DQL Timeseries](https://community.dynatrace.com/t/calculate-average-of-time-shifted-metrics-in-dynatrace-dql-timeseries/46640)

<div class="topic-metadata">

**Author:** [@36Krazyfists](https://community.dynatrace.com/u/36Krazyfists)\
**Replies:** 3\
**Last updated:** [July 7, 2025, 6:08pm UTC](https://community.dynatrace.com/t/calculate-average-of-time-shifted-metrics-in-dynatrace-dql-timeseries/46640 "2025-07-07T18:08:30Z")

</div>

Summary: This thread explains how to use DQL to calculate averages across multiple time-shifted metrics in timeseries queries. It includes syntax examples and practical use cases for trend analysis. So, I have a DQL Que…

---

## [Fetch Log Source Names Using DQL Queries](https://community.dynatrace.com/t/fetch-log-source-names-using-dql-queries/52332)

<div class="topic-metadata">

**Author:** [@PedroDeodato](https://community.dynatrace.com/u/PedroDeodato)\
**Replies:** 3\
**Last updated:** [July 7, 2025, 10:18am UTC](https://community.dynatrace.com/t/fetch-log-source-names-using-dql-queries/52332 "2025-07-07T10:18:07Z")

</div>

Greetings! Well, the post subject pretty much sums it put, but what I need is a DQL query to fetch the name of every log source present on a specific host disk. So, for example, every log source on my environment that …

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

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