# DQL

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

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

**Page:** 27

---

## [Timeseries DQL Query returns no results when fields value is entity.name, but works when it is id](https://community.dynatrace.com/t/timeseries-dql-query-returns-no-results-when-fields-value-is-entity-name-but-works-when-it-is-id/41965)

<div class="topic-metadata">

**Author:** [@36Krazyfists](https://community.dynatrace.com/u/36Krazyfists)\
**Replies:** 1\
**Last updated:** [October 6, 2023, 7:14pm UTC](https://community.dynatrace.com/t/timeseries-dql-query-returns-no-results-when-fields-value-is-entity-name-but-works-when-it-is-id/41965 "2023-10-06T19:14:59Z")

</div>

So yeah, very simple query that I pretty much copied from the Grail Examples in the Dynatrace documentation: timeseries usage=avg(dt.host.cpu.usage), by:{dt.entity.host}, filter:{ dt.entity.host in \[ …

---

## [Detect Metric Anomalies Across Multiple Metrics in Dynatrace](https://community.dynatrace.com/t/detect-metric-anomalies-across-multiple-metrics-in-dynatrace/41905)

<div class="topic-metadata">

**Author:** [@danielD](https://community.dynatrace.com/u/danielD)\
**Replies:** 1\
**Last updated:** [October 3, 2023, 7:14pm UTC](https://community.dynatrace.com/t/detect-metric-anomalies-across-multiple-metrics-in-dynatrace/41905 "2023-10-03T19:14:27Z")

</div>

Hello, Currently when you make a custom metric alert, it can only be based off of one metric. For instance, you can’t tell an alert to go off if there is both a cpu threshold of 95% and a memory threshold of 95%. You ca…

---

## [Get value from key value pair](https://community.dynatrace.com/t/get-value-from-key-value-pair/41862)

<div class="topic-metadata">

**Author:** [@OustiDiousti](https://community.dynatrace.com/u/OustiDiousti)\
**Replies:** 1\
**Last updated:** [September 29, 2023, 2:54pm UTC](https://community.dynatrace.com/t/get-value-from-key-value-pair/41862 "2023-09-29T14:54:51Z")

</div>

Hi team, want to have the result CS-MONITORING, how fetch dt.entity.host | expand tags | filter contains(tags, “invoiced\_team”) | summarize str\_tags = collectDistinct(tags)

---

## [Get http request errors through dql](https://community.dynatrace.com/t/get-http-request-errors-through-dql/41786)

<div class="topic-metadata">

**Author:** [@WellPP](https://community.dynatrace.com/u/WellPP)\
**Replies:** 1\
**Last updated:** [September 26, 2023, 10:28pm UTC](https://community.dynatrace.com/t/get-http-request-errors-through-dql/41786 "2023-09-26T22:28:12Z")

</div>

I’m studying a little about Notebooks, SRG and Workflow. I’m using EasyTravel as a test. I would like to know if it is possible to extract the number of errors 400 and errors 500. And if it is possible to have informati…

---

## [Joining two tables](https://community.dynatrace.com/t/joining-two-tables/41762)

<div class="topic-metadata">

**Author:** [@samgar-kali](https://community.dynatrace.com/u/samgar-kali)\
**Replies:** 1\
**Last updated:** [September 25, 2023, 8:01pm UTC](https://community.dynatrace.com/t/joining-two-tables/41762 "2023-09-25T20:01:30Z")

</div>

I am trying to join two tables. dt.entity.service and “Davis problem events”. I believe the syntax is correct, and I am not seeing any errors. However, the following DQL shows that there are no matching services. Which s…

---

## [Query for nonexisting values](https://community.dynatrace.com/t/query-for-nonexisting-values/41757)

<div class="topic-metadata">

**Author:** [@000panther](https://community.dynatrace.com/u/000panther)\
**Replies:** 1\
**Last updated:** [September 25, 2023, 10:50am UTC](https://community.dynatrace.com/t/query-for-nonexisting-values/41757 "2023-09-25T10:50:48Z")

</div>

I want to find items where a specific field is not existing. How can I do that with DQL? Something like fetch events | filter myItem.nonexisting == null

---

## [Converting a string variable (1m, 1h, 1d) for use in interval](https://community.dynatrace.com/t/converting-a-string-variable-1m-1h-1d-for-use-in-interval/41552)

<div class="topic-metadata">

**Author:** [@Duran\_Narbona](https://community.dynatrace.com/u/Duran_Narbona)\
**Replies:** 1\
**Last updated:** [September 8, 2023, 6:54am UTC](https://community.dynatrace.com/t/converting-a-string-variable-1m-1h-1d-for-use-in-interval/41552 "2023-09-08T06:54:49Z")

</div>

Hi, I have created a variable group\_by in Dashboards/Notrbook to be able to group the result of a query. But I don’t know how to transform this string into a valid value: fetch events | filter event.kind == "DAVIS\_PROB…

---

## [Parsing inside log file](https://community.dynatrace.com/t/parsing-inside-log-file/41312)

<div class="topic-metadata">

**Author:** [@Mahdi24322](https://community.dynatrace.com/u/Mahdi24322)\
**Replies:** 2\
**Last updated:** [September 4, 2023, 2:08pm UTC](https://community.dynatrace.com/t/parsing-inside-log-file/41312 "2023-09-04T14:08:15Z")

</div>

Hi community, I am actually stuck in a parameter, I have a log file that contain a line : number of rows = 0 and I need to monitor this value (0) if it changes to a different value more than (0) , it means that someth…

---

## [DQL error: "exceeded maximum execution time"](https://community.dynatrace.com/t/dql-error-exceeded-maximum-execution-time/41004)

<div class="topic-metadata">

**Author:** [@Ellery](https://community.dynatrace.com/u/Ellery)\
**Replies:** 7\
**Last updated:** [August 30, 2023, 11:31am UTC](https://community.dynatrace.com/t/dql-error-exceeded-maximum-execution-time/41004 "2023-08-30T11:31:04Z")

</div>

Hello, I am generating a table from a DQL query to BIZ Event data, but after some time, I encounter this error:

---

## [Splitting Results by Calendar Day, Week, or Month?](https://community.dynatrace.com/t/splitting-results-by-calendar-day-week-or-month/41338)

<div class="topic-metadata">

**Author:** [@jegron](https://community.dynatrace.com/u/jegron)\
**Replies:** 1\
**Last updated:** [August 24, 2023, 6:33am UTC](https://community.dynatrace.com/t/splitting-results-by-calendar-day-week-or-month/41338 "2023-08-24T06:33:54Z")

</div>

Hello Dynatrace Community, I’ve been working on some DQL queries recently and I’m trying to figure out if it’s possible to split the results by calendar intervals such as a day, week, or month. I’ve noticed the bin and i…

---

## [Count of Problem in each week by its category of the event type from last one month data](https://community.dynatrace.com/t/count-of-problem-in-each-week-by-its-category-of-the-event-type-from-last-one-month-data/41289)

<div class="topic-metadata">

**Author:** [@Bhargav\_314](https://community.dynatrace.com/u/Bhargav_314)\
**Replies:** 11\
**Last updated:** [August 23, 2023, 4:17pm UTC](https://community.dynatrace.com/t/count-of-problem-in-each-week-by-its-category-of-the-event-type-from-last-one-month-data/41289 "2023-08-23T16:17:56Z")

</div>

Count of Problem in each week by its category of the event type from last one month data. Its giving wrong data. fetch events, from:-30d | filter event.kind == “DAVIS\_PROBLEM” | fieldsAdd open\_ts = if(event.status == …

---

## [Notebook Query on Problems data](https://community.dynatrace.com/t/notebook-query-on-problems-data/41262)

<div class="topic-metadata">

**Author:** [@Bhargav\_314](https://community.dynatrace.com/u/Bhargav_314)\
**Replies:** 1\
**Last updated:** [August 22, 2023, 12:48pm UTC](https://community.dynatrace.com/t/notebook-query-on-problems-data/41262 "2023-08-22T12:48:49Z")

</div>

Hi Team, I am trying to fetch Count of problems raised in each week for all the management zones. Could you please help me. In output I need Management Zone along with the Count of Problems raised in a week. Regards, …

---

## [Dashboard Grails query vs Notebook Grails query - different results](https://community.dynatrace.com/t/dashboard-grails-query-vs-notebook-grails-query-different-results/41239)

<div class="topic-metadata">

**Author:** [@garryclarke](https://community.dynatrace.com/u/garryclarke)\
**Replies:** 1\
**Last updated:** [August 17, 2023, 8:21am UTC](https://community.dynatrace.com/t/dashboard-grails-query-vs-notebook-grails-query-different-results/41239 "2023-08-17T08:21:30Z")

</div>

I have been developing the following query in a Notebook which seems to provide me accurate results fetch logs, from: bin(now()-6d, 1d) + 23h + 0m, to: now() | filter matchesValue(aws.log\_group, “Prod-mop-service-order…

---

## [Group again after a split by DQL](https://community.dynatrace.com/t/group-again-after-a-split-by-dql/41070)

<div class="topic-metadata">

**Author:** [@elenaperez](https://community.dynatrace.com/u/elenaperez)\
**Replies:** 4\
**Last updated:** [August 10, 2023, 7:23am UTC](https://community.dynatrace.com/t/group-again-after-a-split-by-dql/41070 "2023-08-10T07:23:20Z")

</div>

Hello, I would like to create a tile in the new dashboards with DQL that shows the avg cpu filtered by osVersion. I did this: timeseries cpu=avg(dt.host.cpu.usage), by:{dt.entity.host} | lookup \[fetch dt.entity.host\]…

---

## [Using multiple timeframes in a single query with lookups](https://community.dynatrace.com/t/using-multiple-timeframes-in-a-single-query-with-lookups/41131)

<div class="topic-metadata">

**Author:** [@PiotrG](https://community.dynatrace.com/u/PiotrG)\
**Replies:** 1\
**Last updated:** [August 9, 2023, 2:00pm UTC](https://community.dynatrace.com/t/using-multiple-timeframes-in-a-single-query-with-lookups/41131 "2023-08-09T14:00:23Z")

</div>

Hey! fetch dt.entity.host, from: now()-15m //1 \[...\] | lookup \[ fetch events, from: now()-3h //2 ...\] | lookup \[ timeframe, //3 ...\] \[rest of the main host query\] I’m wondering about the timeframes that would be …

---

## [How to select the last number of log entries using DPL](https://community.dynatrace.com/t/how-to-select-the-last-number-of-log-entries-using-dpl/41127)

<div class="topic-metadata">

**Author:** [@alibasharat](https://community.dynatrace.com/u/alibasharat)\
**Replies:** 2\
**Last updated:** [August 9, 2023, 12:47pm UTC](https://community.dynatrace.com/t/how-to-select-the-last-number-of-log-entries-using-dpl/41127 "2023-08-09T12:47:03Z")

</div>

Hello team, I have a use case where I am trying to capture the status code from the log entries using DPL. Please take a look at this log entry: https://c\*\*\*.c\*\*\*v.aws.\*\*\*\*\*.com/ cn-\*\*\*.\*\*\*.aws.\*\*\*.com 200 0 0 313 483…

---

## [Transform Typescript query of user sessions from @dynatrace-sdk/client-classic-environment-v1 in Notebooks and Dashboards to JSON](https://community.dynatrace.com/t/transform-typescript-query-of-user-sessions-from-dynatrace-sdk-client-classic-environment-v1-in-notebooks-and-dashboards-to-json/41003)

<div class="topic-metadata">

**Author:** [@heybeckerj](https://community.dynatrace.com/u/heybeckerj)\
**Replies:** 3\
**Last updated:** [August 3, 2023, 5:38pm UTC](https://community.dynatrace.com/t/transform-typescript-query-of-user-sessions-from-dynatrace-sdk-client-classic-environment-v1-in-notebooks-and-dashboards-to-json/41003 "2023-08-03T17:38:38Z")

</div>

SDK query used: Classic environment v1 | Dynatrace Developer I have an api query that returns the result as a json payload with a field for columns and values (records) as arrays: import { rumUserSessionsClient } from …

---

## [Run DQL Queries via Dynatrace API](https://community.dynatrace.com/t/run-dql-queries-via-dynatrace-api/40972)

<div class="topic-metadata">

**Author:** [@JAR1](https://community.dynatrace.com/u/JAR1)\
**Replies:** 2\
**Last updated:** [August 2, 2023, 6:26am UTC](https://community.dynatrace.com/t/run-dql-queries-via-dynatrace-api/40972 "2023-08-02T06:26:08Z")

</div>

Summary: You can access documentation for running DQL queries via the Dynatrace API at Grail service | Dynatrace Developer. The API is also available in the Swagger UI, which lets you test and experiment before writing s…

---

## [DQL Bar graph width](https://community.dynatrace.com/t/dql-bar-graph-width/40965)

<div class="topic-metadata">

**Author:** [@calfano](https://community.dynatrace.com/u/calfano)\
**Replies:** 2\
**Last updated:** [August 2, 2023, 1:11am UTC](https://community.dynatrace.com/t/dql-bar-graph-width/40965 "2023-08-02T01:11:25Z")

</div>

Using DQL I have the following query for Davis problems: fetch events | filter event.kind == "DAVIS\_PROBLEM" | filter matchesValue(entity\_tags, $environment) | summarize problem\_count = count(), by: {\`15m interval\` = bi…

---

## [DQL variable with tag values stopped working](https://community.dynatrace.com/t/dql-variable-with-tag-values-stopped-working/40933)

<div class="topic-metadata">

**Author:** [@MarcioKaue](https://community.dynatrace.com/u/MarcioKaue)\
**Replies:** 4\
**Last updated:** [August 1, 2023, 12:57pm UTC](https://community.dynatrace.com/t/dql-variable-with-tag-values-stopped-working/40933 "2023-08-01T12:57:48Z")

</div>

Hello, We were using a Dashboard with a selector filter that has the existing values of a tag in our hosts for the use case of this Dashboard, but this week the DQL query using the variable stopped working (before it wa…

---

## [Simple log parse](https://community.dynatrace.com/t/simple-log-parse/40866)

<div class="topic-metadata">

**Author:** [@derija](https://community.dynatrace.com/u/derija)\
**Replies:** 1\
**Last updated:** [July 26, 2023, 6:14am UTC](https://community.dynatrace.com/t/simple-log-parse/40866 "2023-07-26T06:14:14Z")

</div>

Hello, Some of the parsing examples leave you not sure how to proceed. Data row in log file: 20230725 15:24:14.278 \[INFO\] DM.WAInputSessionRequestProcessor:7507: \[2023-07-25\_15:24:14.278\] Thread pool name = DM.InputPr…

---

## [Process Group Instance CPU filtered by tag](https://community.dynatrace.com/t/process-group-instance-cpu-filtered-by-tag/40835)

<div class="topic-metadata">

**Author:** [@gilgi](https://community.dynatrace.com/u/gilgi)\
**Replies:** 1\
**Last updated:** [July 23, 2023, 1:15pm UTC](https://community.dynatrace.com/t/process-group-instance-cpu-filtered-by-tag/40835 "2023-07-23T13:15:58Z")

</div>

Hi All, I’m trying to create a chart with the process group instance cpu, but only to processes from a certain kuberenetes namespace. Searching for the list of process groups with the following DQL shows the correct li…

---

## [Null values returned for pending pods](https://community.dynatrace.com/t/null-values-returned-for-pending-pods/40743)

<div class="topic-metadata">

**Author:** [@VivekRagupathy](https://community.dynatrace.com/u/VivekRagupathy)\
**Replies:** 4\
**Last updated:** [July 19, 2023, 11:25am UTC](https://community.dynatrace.com/t/null-values-returned-for-pending-pods/40743 "2023-07-19T11:25:12Z")

</div>

I am trying to filter the pending pods in one of the clusters and also only from any of the two namespaces, so I have written query like mentioned below, I am getting null values as series, If there are no pending pods,…

---

## [Create a variable with the values of a specific tag](https://community.dynatrace.com/t/create-a-variable-with-the-values-of-a-specific-tag/40702)

<div class="topic-metadata">

**Author:** [@elenaperez](https://community.dynatrace.com/u/elenaperez)\
**Replies:** 2\
**Last updated:** [July 14, 2023, 11:25am UTC](https://community.dynatrace.com/t/create-a-variable-with-the-values-of-a-specific-tag/40702 "2023-07-14T11:25:43Z")

</div>

I would like to create a variable that contains the values of a specific tag for the hosts. I’m trying to create the query to get these values. Basically if the tag is called Business Application and the values are X, Y…

---

## [Record keys to array](https://community.dynatrace.com/t/record-keys-to-array/40655)

<div class="topic-metadata">

**Author:** [@michael\_altenhu](https://community.dynatrace.com/u/michael_altenhu)\
**Replies:** 1\
**Last updated:** [July 12, 2023, 1:52pm UTC](https://community.dynatrace.com/t/record-keys-to-array/40655 "2023-07-12T13:52:41Z")

</div>

I use the \`parse\` command with KVP like this data record(str = "name=\\"john\\"; age=33; city=\\"Atlanta\\"") | parse str, "KVP{LD:key'='(LONG:valueLong | STRING:valueStr)'; '?}:person" so the output will look like this "…

---

## [DQL Entity Label](https://community.dynatrace.com/t/dql-entity-label/40540)

<div class="topic-metadata">

**Author:** [@TylerBrush](https://community.dynatrace.com/u/TylerBrush)\
**Replies:** 4\
**Last updated:** [July 6, 2023, 1:20pm UTC](https://community.dynatrace.com/t/dql-entity-label/40540 "2023-07-06T13:20:03Z")

</div>

Hi team, I’ve created a couple posts on #help-dashboards-app and #help-dql but haven’t received a response besides a recommendation to post my question here. My customer is currently trying to add a grail query to a dash…

---

## [DQL Parsing on logs](https://community.dynatrace.com/t/dql-parsing-on-logs/40539)

<div class="topic-metadata">

**Author:** [@jordanb](https://community.dynatrace.com/u/jordanb)\
**Replies:** 1\
**Last updated:** [July 5, 2023, 9:31pm UTC](https://community.dynatrace.com/t/dql-parsing-on-logs/40539 "2023-07-05T21:31:55Z")

</div>

We are currently trying to use the parse feature in DQL to parse out paths that end in different integers. The current format is V + an integer. How can we make it so we do not have to hardcode every possible version suc…

---

## [DQL parsing on a log line that has free text and nested JSON](https://community.dynatrace.com/t/dql-parsing-on-a-log-line-that-has-free-text-and-nested-json/40519)

<div class="topic-metadata">

**Author:** [@shrilekha-s](https://community.dynatrace.com/u/shrilekha-s)\
**Replies:** 2\
**Last updated:** [July 5, 2023, 1:48pm UTC](https://community.dynatrace.com/t/dql-parsing-on-a-log-line-that-has-free-text-and-nested-json/40519 "2023-07-05T13:48:55Z")

</div>

Hi team, I’m trying to extract certain fields(acctAccountNumber,payerAddr and value)from a log line that has a mix of free text followed by a nested JSON - tried different variants but I’m still getting it wrong, any ins…

---

## [DQL- count total number of entity host for tags in each month/day](https://community.dynatrace.com/t/dql-count-total-number-of-entity-host-for-tags-in-each-month-day/40337)

<div class="topic-metadata">

**Author:** [@Jingyi](https://community.dynatrace.com/u/Jingyi)\
**Replies:** 4\
**Last updated:** [June 27, 2023, 2:00pm UTC](https://community.dynatrace.com/t/dql-count-total-number-of-entity-host-for-tags-in-each-month-day/40337 "2023-06-27T14:00:21Z")

</div>

Hi, I would like to use DQL to count total numbers of hosts for tags in each month for a year(Or day for a month). For example, I have tags “id:1”, “id:2” and so on… for many different entity hosts. I am able to count…

---

## [DQL - get the top 5 process of each host](https://community.dynatrace.com/t/dql-get-the-top-5-process-of-each-host/40034)

<div class="topic-metadata">

**Author:** [@StephenLHChan](https://community.dynatrace.com/u/StephenLHChan)\
**Replies:** 10\
**Last updated:** [June 16, 2023, 1:36pm UTC](https://community.dynatrace.com/t/dql-get-the-top-5-process-of-each-host/40034 "2023-06-16T13:36:13Z")

</div>

Hi, I am now facing a problem when writing the DQL query to get the top 5 processes of each host in an 1-hour interval. Here is the DQL that I come up with: timeseries max(dt.process.cpu.usage), by:{host.name, dt.pro…

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

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