# DQL

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

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

**Page:** 19

---

## [Formatting DQL Notebook Query into JSON for Dynatrace WebUI](https://community.dynatrace.com/t/formatting-dql-notebook-query-into-json-for-dynatrace-webui/49050)

<div class="topic-metadata">

**Author:** [@Samaneh](https://community.dynatrace.com/u/Samaneh)\
**Replies:** 1\
**Last updated:** [November 26, 2024, 9:01am UTC](https://community.dynatrace.com/t/formatting-dql-notebook-query-into-json-for-dynatrace-webui/49050 "2024-11-26T09:01:50Z")

</div>

Hi everyone, I’m working with DQL in Dynatrace notebooks, and I need to format my query into a JSON payload for use in the Dynatrace WebUI. The challenge is that several characters—like double quotes ("), backslashes (\\…

---

## [DQL - replacing all hexadecimal pattern](https://community.dynatrace.com/t/dql-replacing-all-hexadecimal-pattern/49045)

<div class="topic-metadata">

**Author:** [@Yann\_Buccellato](https://community.dynatrace.com/u/Yann_Buccellato)\
**Replies:** 1\
**Last updated:** [November 25, 2024, 5:06pm UTC](https://community.dynatrace.com/t/dql-replacing-all-hexadecimal-pattern/49045 "2024-11-25T17:06:27Z")

</div>

Good morning community, is there an easy way to replace any hexadecimal pattern from the text of a field? Example: com.sap.it.rt.adapter.http.api.exception.HttpResponseException: An internal server error occured: HTT…

---

## [Compare two dql query count value](https://community.dynatrace.com/t/compare-two-dql-query-count-value/46756)

<div class="topic-metadata">

**Author:** [@biswajit-roy76](https://community.dynatrace.com/u/biswajit-roy76)\
**Replies:** 3\
**Last updated:** [November 25, 2024, 10:40am UTC](https://community.dynatrace.com/t/compare-two-dql-query-count-value/46756 "2024-11-25T10:40:42Z")

</div>

I want to compare two logs count value in dql . How can I achieve that?

---

## [Expanding Multiple arrays](https://community.dynatrace.com/t/expanding-multiple-arrays/49012)

<div class="topic-metadata">

**Author:** [@Javin\_Singh](https://community.dynatrace.com/u/Javin_Singh)\
**Replies:** 2\
**Last updated:** [November 25, 2024, 8:39am UTC](https://community.dynatrace.com/t/expanding-multiple-arrays/49012 "2024-11-25T08:39:19Z")

</div>

I am trying to expand multiple arrays in 3 separate columns (“Host\_Metric”, “Start” and “End”). Each array in all 3 columns has 97 elements. I am trying to expand each of the arrays into records. However, when I used th…

---

## [Is there a reverse command of fieldsFlatten?](https://community.dynatrace.com/t/is-there-a-reverse-command-of-fieldsflatten/48445)

<div class="topic-metadata">

**Author:** [@lucassilveira](https://community.dynatrace.com/u/lucassilveira)\
**Replies:** 5\
**Last updated:** [November 21, 2024, 1:21pm UTC](https://community.dynatrace.com/t/is-there-a-reverse-command-of-fieldsflatten/48445 "2024-11-21T13:21:47Z")

</div>

I would like to make a json from some log attributes. Is this possible?

---

## [DQL behind the ThirdParty Vulnerability app](https://community.dynatrace.com/t/dql-behind-the-thirdparty-vulnerability-app/46119)

<div class="topic-metadata">

**Author:** [@ANLTH](https://community.dynatrace.com/u/ANLTH)\
**Replies:** 1\
**Last updated:** [November 21, 2024, 10:43am UTC](https://community.dynatrace.com/t/dql-behind-the-thirdparty-vulnerability-app/46119 "2024-11-21T10:43:16Z")

</div>

I am woriking on understanding how we shall use ownership in Dynatrace in relation to Applicaiton Security. I have added the Owner tag to some processes that has vulnerabilites, and I am able to filter by the tag and ge…

---

## [Metric anomaly detection for a range of values in the logs](https://community.dynatrace.com/t/metric-anomaly-detection-for-a-range-of-values-in-the-logs/47284)

<div class="topic-metadata">

**Author:** [@davidrb](https://community.dynatrace.com/u/davidrb)\
**Replies:** 1\
**Last updated:** [November 21, 2024, 10:20am UTC](https://community.dynatrace.com/t/metric-anomaly-detection-for-a-range-of-values-in-the-logs/47284 "2024-11-21T10:20:56Z")

</div>

Attempting to create an Anomaly detection metric event based on a specific range of data from logs. I can find this data from the logs with this DQL query: fetch logs | filter matchesValue(k8s.namespace.name, "app-names…

---

## [Average of 2 arrays by a field](https://community.dynatrace.com/t/average-of-2-arrays-by-a-field/48582)

<div class="topic-metadata">

**Author:** [@elenaperez](https://community.dynatrace.com/u/elenaperez)\
**Replies:** 1\
**Last updated:** [November 20, 2024, 8:41pm UTC](https://community.dynatrace.com/t/average-of-2-arrays-by-a-field/48582 "2024-11-20T20:41:11Z")

</div>

Hi team, Having the following query: timeseries value = avg(dt.cloud.azure.vm.cpu\_usage), by: {azure.location, azure.management\_group, azure.resource.name, azure.subscription, azure.vm\_scale\_set.name, dt.entity.azure\_r…

---

## [PromQL rate](https://community.dynatrace.com/t/promql-rate/45395)

<div class="topic-metadata">

**Author:** [@ghfsa](https://community.dynatrace.com/u/ghfsa)\
**Replies:** 1\
**Last updated:** [November 20, 2024, 8:31pm UTC](https://community.dynatrace.com/t/promql-rate/45395 "2024-11-20T20:31:25Z")

</div>

Does DQL support the equivalent of \`rate\` in PromQL? How would I achieve this with DQL? rate(http\_requests\_total\[5m\])\[30m:1m\] In fact, it would be extremely helpful to have a 1-to-1 mapping for the “getting started exa…

---

## [Having trouble adding a field to a record within grail via a processing rule](https://community.dynatrace.com/t/having-trouble-adding-a-field-to-a-record-within-grail-via-a-processing-rule/44594)

<div class="topic-metadata">

**Author:** [@sivart\_89](https://community.dynatrace.com/u/sivart_89)\
**Replies:** 2\
**Last updated:** [November 20, 2024, 3:39pm UTC](https://community.dynatrace.com/t/having-trouble-adding-a-field-to-a-record-within-grail-via-a-processing-rule/44594 "2024-11-20T15:39:24Z")

</div>

I’m trying to add field error.type when specific messages occur within sfm records, within a custom 2.0 extension I have created. I’ve defined the processing rule below. When Connection exists but no metrics have been p…

---

## [DQL for Site Reliability Guardian Objectives](https://community.dynatrace.com/t/dql-for-site-reliability-guardian-objectives/44602)

<div class="topic-metadata">

**Author:** [@r\_weber](https://community.dynatrace.com/u/r_weber)\
**Replies:** 1\
**Last updated:** [November 20, 2024, 11:41am UTC](https://community.dynatrace.com/t/dql-for-site-reliability-guardian-objectives/44602 "2024-11-20T11:41:26Z")

</div>

Hey, I’m attempting to optimize DQL queries for some SRG objectives as I have hit “execution timeouts” on the validation when triggered from workflows. Though the query goal is not SRG related itself but could also be …

---

## [Is that possible to get License usage by DQL?](https://community.dynatrace.com/t/is-that-possible-to-get-license-usage-by-dql/43603)

<div class="topic-metadata">

**Author:** [@LuisnaviaTE](https://community.dynatrace.com/u/LuisnaviaTE)\
**Replies:** 2\
**Last updated:** [November 18, 2024, 8:42am UTC](https://community.dynatrace.com/t/is-that-possible-to-get-license-usage-by-dql/43603 "2024-11-18T08:42:36Z")

</div>

I want to get license usage by DQL query.

---

## [Get all problems for a specific tag ("Application") on a service and a specific tag on a host ("Environment")](https://community.dynatrace.com/t/get-all-problems-for-a-specific-tag-application-on-a-service-and-a-specific-tag-on-a-host-environment/42218)

<div class="topic-metadata">

**Author:** [@jmoormann](https://community.dynatrace.com/u/jmoormann)\
**Replies:** 2\
**Last updated:** [November 17, 2024, 10:27pm UTC](https://community.dynatrace.com/t/get-all-problems-for-a-specific-tag-application-on-a-service-and-a-specific-tag-on-a-host-environment/42218 "2024-11-17T22:27:08Z")

</div>

Been trying to work out a DQL to get all the problems from events where the service with the problem is filtered on a custom tag called “Application”, and where the host the service runs on is filtered on a custom tag ca…

---

## [The access log on my environment,  where can I find this](https://community.dynatrace.com/t/the-access-log-on-my-environment-where-can-i-find-this/48914)

<div class="topic-metadata">

**Author:** [@henk\_stobbe](https://community.dynatrace.com/u/henk_stobbe)\
**Replies:** 3\
**Last updated:** [November 15, 2024, 4:45pm UTC](https://community.dynatrace.com/t/the-access-log-on-my-environment-where-can-i-find-this/48914 "2024-11-15T16:45:03Z")

</div>

Hello, Is there anyway I can DQL the access log on my DT environment? Iwant to see all API calls. Would be nice to have this, KR Henk

---

## [Calculating a Rolling Summary in a DQL](https://community.dynatrace.com/t/calculating-a-rolling-summary-in-a-dql/41942)

<div class="topic-metadata">

**Author:** [@pmurray30](https://community.dynatrace.com/u/pmurray30)\
**Replies:** 2\
**Last updated:** [November 14, 2024, 5:51pm UTC](https://community.dynatrace.com/t/calculating-a-rolling-summary-in-a-dql/41942 "2024-11-14T17:51:31Z")

</div>

Hello, I have the following DQL, which returns a time series of a metric “incoming count in last minute” from a custom extension/generic db query. timeseries query=sum(custom.db.query), :interval:1m, filter:{in(dt.ent…

---

## [DQL query to replace null values into an integer in a array](https://community.dynatrace.com/t/dql-query-to-replace-null-values-into-an-integer-in-a-array/48896)

<div class="topic-metadata">

**Author:** [@Elumalai](https://community.dynatrace.com/u/Elumalai)\
**Replies:** 2\
**Last updated:** [November 14, 2024, 4:20pm UTC](https://community.dynatrace.com/t/dql-query-to-replace-null-values-into-an-integer-in-a-array/48896 "2024-11-14T16:20:23Z")

</div>

Hi Team, I’m using single synthetic monitoring configuration where I have configured 3 http requests and I would like to monitor all 3 http url in a dashboard. If any http url receives status code other than 200 then it…

---

## [Alert whenever a new log entry is generated](https://community.dynatrace.com/t/alert-whenever-a-new-log-entry-is-generated/48775)

<div class="topic-metadata">

**Author:** [@Vikas\_g1997](https://community.dynatrace.com/u/Vikas_g1997)\
**Replies:** 3\
**Last updated:** [November 13, 2024, 6:28pm UTC](https://community.dynatrace.com/t/alert-whenever-a-new-log-entry-is-generated/48775 "2024-11-13T18:28:17Z")

</div>

Hi Team, I am new to DQL and need some guidance on setting up alerts. We have a customer requirement to trigger an alert whenever a new log entry is generated from a specified log source. Could anyone assist with how we…

---

## [How to use regex with DQL?](https://community.dynatrace.com/t/how-to-use-regex-with-dql/48842)

<div class="topic-metadata">

**Author:** [@jegron](https://community.dynatrace.com/u/jegron)\
**Replies:** 1\
**Last updated:** [November 13, 2024, 12:51pm UTC](https://community.dynatrace.com/t/how-to-use-regex-with-dql/48842 "2024-11-13T12:51:04Z")

</div>

Hi, I’d like to build a complex regex in DQL. I can’t use the same syntax as OneAgent’s masking rule, so I tested the parse command: fetch logs | parse content, "DATA (\[:space:\]|\[:punct:\])(\[12\]\[0-9\]{2}\[0\]\[1-9\]\[0-9\]{2}\[…

---

## [Can we get OneAgent restart info using DQL?](https://community.dynatrace.com/t/can-we-get-oneagent-restart-info-using-dql/48847)

<div class="topic-metadata">

**Author:** [@AK](https://community.dynatrace.com/u/AK)\
**Replies:** 5\
**Last updated:** [November 13, 2024, 11:49am UTC](https://community.dynatrace.com/t/can-we-get-oneagent-restart-info-using-dql/48847 "2024-11-13T11:49:10Z")

</div>

Hi Folks, I need some help, is it possible to get OneAgent restart info using DQL? Regards, AK

---

## [DQL: getting called services nested](https://community.dynatrace.com/t/dql-getting-called-services-nested/48849)

<div class="topic-metadata">

**Author:** [@erh\_inetum](https://community.dynatrace.com/u/erh_inetum)\
**Replies:** 2\
**Last updated:** [November 13, 2024, 7:10am UTC](https://community.dynatrace.com/t/dql-getting-called-services-nested/48849 "2024-11-13T07:10:14Z")

</div>

Hi, I’m trying to get the called services nested from the other one. I want to get something like this using DQL. For this I’m launching this query: fetch dt.entity.service |filter entity.name == “MY SERVICE” |fi…

---

## [Extract Records forn Array](https://community.dynatrace.com/t/extract-records-forn-array/48675)

<div class="topic-metadata">

**Author:** [@carlos\_carreno](https://community.dynatrace.com/u/carlos_carreno)\
**Replies:** 2\
**Last updated:** [November 12, 2024, 9:45pm UTC](https://community.dynatrace.com/t/extract-records-forn-array/48675 "2024-11-12T21:45:25Z")

</div>

Good afternoon, how can I extract the entries from this column and convert each entry into rows? I need to extract the information from each entry and create a row for each of those entries. thanks

---

## [cant retrieve id using classEntitySelector](https://community.dynatrace.com/t/cant-retrieve-id-using-classentityselector/48692)

<div class="topic-metadata">

**Author:** [@noe131518](https://community.dynatrace.com/u/noe131518)\
**Replies:** 1\
**Last updated:** [November 12, 2024, 4:36pm UTC](https://community.dynatrace.com/t/cant-retrieve-id-using-classentityselector/48692 "2024-11-12T16:36:23Z")

</div>

In this page of the official documentation : DQL Best practices - Dynatrace Docs The two exemple dont return the same fields, since first one also return the process group instance id. I was wondering how we could retri…

---

## [Timeseries - Add Timestamp](https://community.dynatrace.com/t/timeseries-add-timestamp/48684)

<div class="topic-metadata">

**Author:** [@Gib80](https://community.dynatrace.com/u/Gib80)\
**Replies:** 1\
**Last updated:** [November 12, 2024, 4:07pm UTC](https://community.dynatrace.com/t/timeseries-add-timestamp/48684 "2024-11-12T16:07:58Z")

</div>

Hi All, Is it possible to show a timestamp field when querying a timeseries. I have this command created via a logs metrics extraction and I need to see the date the losg arrived. timeseries count = count(log.applicat…

---

## [DQL parse of log not getting complete data.](https://community.dynatrace.com/t/dql-parse-of-log-not-getting-complete-data/48716)

<div class="topic-metadata">

**Author:** [@rseibert1](https://community.dynatrace.com/u/rseibert1)\
**Replies:** 7\
**Last updated:** [November 12, 2024, 10:07am UTC](https://community.dynatrace.com/t/dql-parse-of-log-not-getting-complete-data/48716 "2024-11-12T10:07:55Z")

</div>

The log below has multiple entries I am only getting the first set with my parse, seems I am missing a way to make it iterate through to the end? { “content”: { “alertText”: \[ { “Id”: “Workers-22”, “SpaceId”: “Spac…

---

## [kubernetes logs in DQL by cluster name](https://community.dynatrace.com/t/kubernetes-logs-in-dql-by-cluster-name/48755)

<div class="topic-metadata">

**Author:** [@roberto\_camp1](https://community.dynatrace.com/u/roberto_camp1)\
**Replies:** 1\
**Last updated:** [November 7, 2024, 2:22pm UTC](https://community.dynatrace.com/t/kubernetes-logs-in-dql-by-cluster-name/48755 "2024-11-07T14:22:58Z")

</div>

I have a dashboard for AWS EKS clusters where all the tiles are dependent on a $Cluster variable that contains the cluster name in the format derived from DQL: fetch dt.entity.kubernetes\_cluster | fields entity.name |…

---

## [Iterate through an log record](https://community.dynatrace.com/t/iterate-through-an-log-record/48699)

<div class="topic-metadata">

**Author:** [@olgatimbur](https://community.dynatrace.com/u/olgatimbur)\
**Replies:** 2\
**Last updated:** [November 5, 2024, 4:20am UTC](https://community.dynatrace.com/t/iterate-through-an-log-record/48699 "2024-11-05T04:20:10Z")

</div>

I am trying to determine a status of a scenario as passed/failed | fieldsAdd status = event\[steps\] Each step record can have a list of element and results: example: \[ { “result”: “passed”, “error”: “” },{ “name”: “I …

---

## [How to get log attributes in the Davis Anamoly detection Event Proeperties](https://community.dynatrace.com/t/how-to-get-log-attributes-in-the-davis-anamoly-detection-event-proeperties/48642)

<div class="topic-metadata">

**Author:** [@subashsagi41](https://community.dynatrace.com/u/subashsagi41)\
**Replies:** 1\
**Last updated:** [October 31, 2024, 1:33am UTC](https://community.dynatrace.com/t/how-to-get-log-attributes-in-the-davis-anamoly-detection-event-proeperties/48642 "2024-10-31T01:33:34Z")

</div>

Hi, I was able to get the dimensions from the metrics but not directly from the logs. Here is my query fetch logs | filter contains(azure.resource.name, "MTH") and contains(content, "QRY\_STATUS") and contains(content, …

---

## [Show in with DQL or entity selector the hosts of a service](https://community.dynatrace.com/t/show-in-with-dql-or-entity-selector-the-hosts-of-a-service/48638)

<div class="topic-metadata">

**Author:** [@Pabloabad](https://community.dynatrace.com/u/Pabloabad)\
**Replies:** 1\
**Last updated:** [October 30, 2024, 11:00pm UTC](https://community.dynatrace.com/t/show-in-with-dql-or-entity-selector-the-hosts-of-a-service/48638 "2024-10-30T23:00:54Z")

</div>

I need to pull up all the hosts that are running on a specific service but I am not able to pull it up through dql.

---

## [DQL Matching and comparing on two arrays](https://community.dynatrace.com/t/dql-matching-and-comparing-on-two-arrays/48595)

<div class="topic-metadata">

**Author:** [@calfano](https://community.dynatrace.com/u/calfano)\
**Replies:** 2\
**Last updated:** [October 29, 2024, 12:48pm UTC](https://community.dynatrace.com/t/dql-matching-and-comparing-on-two-arrays/48595 "2024-10-29T12:48:24Z")

</div>

Hello DQL Experts, Running into a situation where I have two arrays. I want to be able to make records based on the comparison of these two arrays without using the expand or summarize commands. I can’t really articula…

---

## [Metric Timeseries with Array Dimension](https://community.dynatrace.com/t/metric-timeseries-with-array-dimension/48544)

<div class="topic-metadata">

**Author:** [@StrangerThing](https://community.dynatrace.com/u/StrangerThing)\
**Replies:** 2\
**Last updated:** [October 25, 2024, 3:16pm UTC](https://community.dynatrace.com/t/metric-timeseries-with-array-dimension/48544 "2024-10-25T15:16:05Z")

</div>

I have a log metric that has a dimension of the array type. When I put this metric in a timeseries, I split by this dimension, however it collects the entire array when doing so, instead of each element. I tried using th…

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

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