# DQL

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

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

**Page:** 25

---

## [Why is wildcard required in DQL matchesPhrase with host.name?](https://community.dynatrace.com/t/why-is-wildcard-required-in-dql-matchesphrase-with-host-name/44156)

<div class="topic-metadata">

**Author:** [@GerryIsHere](https://community.dynatrace.com/u/GerryIsHere)\
**Replies:** 5\
**Last updated:** [February 15, 2024, 10:01pm UTC](https://community.dynatrace.com/t/why-is-wildcard-required-in-dql-matchesphrase-with-host-name/44156 "2024-02-15T22:01:21Z")

</div>

This fails: fetch logs | filter matchesPhrase(host.name, “carn”) // fail and matchesPhrase(log.source, “rmwfeapi”) and matchesPhrase(content, “Unable”) | fieldsKeep timestamp, host.name, content, log.source This wo…

---

## [Count of problem based on duration its open. \<1 hour \<12 hours \<24 hours \>24 hours.](https://community.dynatrace.com/t/count-of-problem-based-on-duration-its-open-1-hour-12-hours-24-hours-24-hours/41314)

<div class="topic-metadata">

**Author:** [@Bhargav\_314](https://community.dynatrace.com/u/Bhargav_314)\
**Replies:** 2\
**Last updated:** [February 12, 2024, 8:22pm UTC](https://community.dynatrace.com/t/count-of-problem-based-on-duration-its-open-1-hour-12-hours-24-hours-24-hours/41314 "2024-02-12T20:22:24Z")

</div>

Hi Team, Can you please let me know how to apply these filters and get the counts based on duration of the problem open. Requirement: Count of problem based on duration its open. \<1 hour \<12 hours \<24 hours \>24 hours. …

---

## [How to derive a field in DQL](https://community.dynatrace.com/t/how-to-derive-a-field-in-dql/43984)

<div class="topic-metadata">

**Author:** [@susmita\_k](https://community.dynatrace.com/u/susmita_k)\
**Replies:** 12\
**Last updated:** [February 9, 2024, 6:15pm UTC](https://community.dynatrace.com/t/how-to-derive-a-field-in-dql/43984 "2024-02-09T18:15:32Z")

</div>

I have a problem where i need to check log content for job status. If the job status is STARTED and not ENDED yet then need to show as Running, and if the Job status is started and ended ok, then Completed, else if job s…

---

## [Rough idea of price for a 30d query over 8000 hosts](https://community.dynatrace.com/t/rough-idea-of-price-for-a-30d-query-over-8000-hosts/44023)

<div class="topic-metadata">

**Author:** [@jdsumsion](https://community.dynatrace.com/u/jdsumsion)\
**Replies:** 1\
**Last updated:** [February 8, 2024, 10:01pm UTC](https://community.dynatrace.com/t/rough-idea-of-price-for-a-30d-query-over-8000-hosts/44023 "2024-02-08T22:01:40Z")

</div>

I was trying to figure out about how many host-unit-hrs I was paying for non-prod hosts. fetch dt.entity.host | fieldsAdd entity.type, entity.name, lifetime, tags, hypervisorType, memoryTotal, physicalMemory, paasMemory…

---

## [Log Monitoring - DQL](https://community.dynatrace.com/t/log-monitoring-dql/44002)

<div class="topic-metadata">

**Author:** [@munawarhossain1](https://community.dynatrace.com/u/munawarhossain1)\
**Replies:** 8\
**Last updated:** [February 8, 2024, 4:27pm UTC](https://community.dynatrace.com/t/log-monitoring-dql/44002 "2024-02-08T16:27:22Z")

</div>

Hello, I’m using this query and I want to exclude a particular text from logs - “fetch logs //, scanLimitGBytes: 500, samplingRatio: 1000 | filter matchesValue(dt.entity.process\_group, “abcd”) and matchesValue(status,…

---

## [Fetch active problems](https://community.dynatrace.com/t/fetch-active-problems/40019)

<div class="topic-metadata">

**Author:** [@educampver](https://community.dynatrace.com/u/educampver)\
**Replies:** 4\
**Last updated:** [February 5, 2024, 1:45pm UTC](https://community.dynatrace.com/t/fetch-active-problems/40019 "2024-02-05T13:45:39Z")

</div>

Hi, I am trying to make a query that would fetch currently active problems, but I’m struggling with handling multiple of the same display\_id. The filters I think will be good enough for me would look like this: | filte…

---

## [Count of memory usage breaches](https://community.dynatrace.com/t/count-of-memory-usage-breaches/43948)

<div class="topic-metadata">

**Author:** [@uzahid](https://community.dynatrace.com/u/uzahid)\
**Replies:** 1\
**Last updated:** [February 2, 2024, 10:02pm UTC](https://community.dynatrace.com/t/count-of-memory-usage-breaches/43948 "2024-02-02T22:02:46Z")

</div>

Hi, I’m trying to get my query to return a count of breaches of a threshold for the memory usage on a set of server. Unfortunately, i’m not quite being able to figure out that’s possible. The current query I have retur…

---

## [Log processing rule](https://community.dynatrace.com/t/log-processing-rule/43907)

<div class="topic-metadata">

**Author:** [@tjay](https://community.dynatrace.com/u/tjay)\
**Replies:** 6\
**Last updated:** [February 2, 2024, 7:56am UTC](https://community.dynatrace.com/t/log-processing-rule/43907 "2024-02-02T07:56:59Z")

</div>

Hi, I’m trying to parse an Apache log file, but “Test the rule” complains with “The matcher query doesn’t match the provided log sample”. Can someone tell why? Process definition PARSE(content, “IPADDR:‘net.peer.ip’ …

---

## [Parse multiple entries in quotes](https://community.dynatrace.com/t/parse-multiple-entries-in-quotes/43835)

<div class="topic-metadata">

**Author:** [@S\_Hadley1138](https://community.dynatrace.com/u/S_Hadley1138)\
**Replies:** 1\
**Last updated:** [January 25, 2024, 7:29pm UTC](https://community.dynatrace.com/t/parse-multiple-entries-in-quotes/43835 "2024-01-25T19:29:51Z")

</div>

Just a follow up on this one… but slightly different question, @sinisa\_zubic as you are clearly a wizard in this area… Solved: simple csv event log parse - Dynatrace Community So IF i have some lines in my log with mu…

---

## [Calculate time interval between 2 timestamps records](https://community.dynatrace.com/t/calculate-time-interval-between-2-timestamps-records/43825)

<div class="topic-metadata">

**Author:** [@AlexisGND](https://community.dynatrace.com/u/AlexisGND)\
**Replies:** 14\
**Last updated:** [January 25, 2024, 3:45pm UTC](https://community.dynatrace.com/t/calculate-time-interval-between-2-timestamps-records/43825 "2024-01-25T15:45:58Z")

</div>

Hi, I ingested customized logs into Dynatrace. I have 2 columns named “bmx.hip.execution.endtime” and “bmx.hip.execution.starttime” with are timestamps in iso format. Is there any way to calculate the time interval …

---

## [Add these values](https://community.dynatrace.com/t/add-these-values/43518)

<div class="topic-metadata">

**Author:** [@yuval1983](https://community.dynatrace.com/u/yuval1983)\
**Replies:** 19\
**Last updated:** [January 21, 2024, 7:02am UTC](https://community.dynatrace.com/t/add-these-values/43518 "2024-01-21T07:02:56Z")

</div>

Hi I want to add these values filter and I want it to affect what is in the view fetch dt.entity.service | fields entity.name, managementZones = managementZones | filter matchesValue(managementZones, “prod”) -------…

---

## [BizEvents not capture multiple values](https://community.dynatrace.com/t/bizevents-not-capture-multiple-values/43513)

<div class="topic-metadata">

**Author:** [@gbaudart](https://community.dynatrace.com/u/gbaudart)\
**Replies:** 6\
**Last updated:** [January 18, 2024, 3:19pm UTC](https://community.dynatrace.com/t/bizevents-not-capture-multiple-values/43513 "2024-01-18T15:19:44Z")

</div>

Hello Community, I’ve some questions about BizEvents and issues I’m encountering. This is my first time working on BizEvents, so the answers may be simple. I would like to retrieve the “Request-Body” information from …

---

## [DPL - multiline CSV content](https://community.dynatrace.com/t/dpl-multiline-csv-content/43652)

<div class="topic-metadata">

**Author:** [@jegron](https://community.dynatrace.com/u/jegron)\
**Replies:** 3\
**Last updated:** [January 18, 2024, 10:50am UTC](https://community.dynatrace.com/t/dpl-multiline-csv-content/43652 "2024-01-18T10:50:25Z")

</div>

Hi, I’m working on a project where I need to parse a CSV file, but I’m not sure how to effectively read and handle each line of the text. I tried this without success : { “content”: “Server1;Infrastructure\\Server2;Inf…

---

## [Top 10 Values Timeseries with Additional 'Other' Aggregate Category](https://community.dynatrace.com/t/top-10-values-timeseries-with-additional-other-aggregate-category/43563)

<div class="topic-metadata">

**Author:** [@jegron](https://community.dynatrace.com/u/jegron)\
**Replies:** 3\
**Last updated:** [January 17, 2024, 7:27am UTC](https://community.dynatrace.com/t/top-10-values-timeseries-with-additional-other-aggregate-category/43563 "2024-01-17T07:27:13Z")

</div>

Hi, I would like to construct a timeseries that includes a set number of the highest values, plus an additional aggregated category named ‘Other.’ This ‘Other’ category should represent the sum of all the remaining valu…

---

## [simple csv event log parse](https://community.dynatrace.com/t/simple-csv-event-log-parse/43568)

<div class="topic-metadata">

**Author:** [@S\_Hadley1138](https://community.dynatrace.com/u/S_Hadley1138)\
**Replies:** 5\
**Last updated:** [January 15, 2024, 8:55am UTC](https://community.dynatrace.com/t/simple-csv-event-log-parse/43568 "2024-01-15T08:55:55Z")

</div>

Hi there, I’m having a problem with a simple parser acting on a csv file. my problem appears when there is an empty field and a “,” in the source log. I’ve simplified the log below to attempt to easily demonstrate my is…

---

## [DQL Dashboard Queries](https://community.dynatrace.com/t/dql-dashboard-queries/41904)

<div class="topic-metadata">

**Author:** [@danielD](https://community.dynatrace.com/u/danielD)\
**Replies:** 3\
**Last updated:** [January 11, 2024, 6:58am UTC](https://community.dynatrace.com/t/dql-dashboard-queries/41904 "2024-01-11T06:58:54Z")

</div>

Hello, As I understand it not all Dynatrace metrics are currently in grail. For the metrics that are not, can you still use dql to query those metrics, for instance on the new dashboard app? Or do you have to create tho…

---

## [DQLQuery for calculating totalbytes sent/received by portfolios](https://community.dynatrace.com/t/dqlquery-for-calculating-totalbytes-sent-received-by-portfolios/43122)

<div class="topic-metadata">

**Author:** [@ramsundar](https://community.dynatrace.com/u/ramsundar)\
**Replies:** 2\
**Last updated:** [January 10, 2024, 8:09pm UTC](https://community.dynatrace.com/t/dqlquery-for-calculating-totalbytes-sent-received-by-portfolios/43122 "2024-01-10T20:09:17Z")

</div>

We are forwarding Firewall traffic logs to dynatrace , and we split into columns like srcip , dstip , port , sentbyte & received byte. Now i need calculate totalbytes by adding sent & received byte , which should group …

---

## [Get OPEN and CLOSED Davis problem](https://community.dynatrace.com/t/get-open-and-closed-davis-problem/41496)

<div class="topic-metadata">

**Author:** [@Duran\_Narbona](https://community.dynatrace.com/u/Duran_Narbona)\
**Replies:** 7\
**Last updated:** [January 10, 2024, 12:46pm UTC](https://community.dynatrace.com/t/get-open-and-closed-davis-problem/41496 "2024-01-10T12:46:17Z")

</div>

Good afternoon, I have two doubts: Why when a problem is closed, it can appear with the word CLOSED and others with RESOLVED, or de mix? Why does the CLOSED event appear twice in almost every Davis problem, within sec…

---

## [DQL: filter by ZONE](https://community.dynatrace.com/t/dql-filter-by-zone/43369)

<div class="topic-metadata">

**Author:** [@yuval1983](https://community.dynatrace.com/u/yuval1983)\
**Replies:** 9\
**Last updated:** [January 7, 2024, 10:01am UTC](https://community.dynatrace.com/t/dql-filter-by-zone/43369 "2024-01-07T10:01:02Z")

</div>

HI, I created this filter, and I want to add another filter in addition that I can see by ZONE I can Search but the list to long so i what to add another filer can you help :slightly\_smiling\_face:

---

## [How to match a timestamp field in a Log](https://community.dynatrace.com/t/how-to-match-a-timestamp-field-in-a-log/43086)

<div class="topic-metadata">

**Author:** [@dynaNoob](https://community.dynatrace.com/u/dynaNoob)\
**Replies:** 1\
**Last updated:** [January 5, 2024, 9:17pm UTC](https://community.dynatrace.com/t/how-to-match-a-timestamp-field-in-a-log/43086 "2024-01-05T21:17:13Z")

</div>

I am very new to DQL and I am trying to breakdown a time field in a log content Ex: content: WARN, Module 1 has a thread in hung state, Thread hang duration: 00:00:00:32 - WARN, Module 2 has a thread in hung state, T…

---

## [How to calculate timestamp duration using DQL query](https://community.dynatrace.com/t/how-to-calculate-timestamp-duration-using-dql-query/41092)

<div class="topic-metadata">

**Author:** [@mehulpatil55](https://community.dynatrace.com/u/mehulpatil55)\
**Replies:** 5\
**Last updated:** [January 4, 2024, 4:28pm UTC](https://community.dynatrace.com/t/how-to-calculate-timestamp-duration-using-dql-query/41092 "2024-01-04T16:28:11Z")

</div>

Hello Team I need to calculate duration between start time and end time of timestamp

---

## [I would like to create a notebook query in order to check for the average lock time a specific service is experiencing](https://community.dynatrace.com/t/i-would-like-to-create-a-notebook-query-in-order-to-check-for-the-average-lock-time-a-specific-service-is-experiencing/43329)

<div class="topic-metadata">

**Author:** [@SharonGellerTip](https://community.dynatrace.com/u/SharonGellerTip)\
**Replies:** 1\
**Last updated:** [January 3, 2024, 4:41pm UTC](https://community.dynatrace.com/t/i-would-like-to-create-a-notebook-query-in-order-to-check-for-the-average-lock-time-a-specific-service-is-experiencing/43329 "2024-01-03T16:41:22Z")

</div>

I want to monitor the average lock time a specific service is experiencing using a DQL query

---

## ["There are no records" to replace with Zero/0](https://community.dynatrace.com/t/there-are-no-records-to-replace-with-zero-0/43344)

<div class="topic-metadata">

**Author:** [@amrit3671](https://community.dynatrace.com/u/amrit3671)\
**Replies:** 2\
**Last updated:** [January 2, 2024, 4:54am UTC](https://community.dynatrace.com/t/there-are-no-records-to-replace-with-zero-0/43344 "2024-01-02T04:54:05Z")

</div>

In Case GRAIL gives “There are no records” in the tile output, is there any way to display it as 0 instead of this message?

---

## [Which DPL syntax is applicable?](https://community.dynatrace.com/t/which-dpl-syntax-is-applicable/43197)

<div class="topic-metadata">

**Author:** [@WellPP](https://community.dynatrace.com/u/WellPP)\
**Replies:** 2\
**Last updated:** [January 1, 2024, 7:33am UTC](https://community.dynatrace.com/t/which-dpl-syntax-is-applicable/43197 "2024-01-01T07:33:45Z")

</div>

I am creating a processing rule through MATCHER: matchesPhrase(content, “setFinalReturnCustomerState”) AND dt.entity.cloud\_application == “CLOUD\_APPLICATION-” I get the log line that has the content: { “@timestamp”: …

---

## [DQL - BIZEVENT  alarming](https://community.dynatrace.com/t/dql-bizevent-alarming/43156)

<div class="topic-metadata">

**Author:** [@Ellery](https://community.dynatrace.com/u/Ellery)\
**Replies:** 2\
**Last updated:** [December 26, 2023, 10:55pm UTC](https://community.dynatrace.com/t/dql-bizevent-alarming/43156 "2023-12-26T22:55:29Z")

</div>

Hello, how is this great community doing? I have the following question: I have a chart created with bizevent, but I would like to have an alarm associated with the result of this. How can I do this? Why haven’t I be…

---

## [DQL to filter problem events by alerting profile](https://community.dynatrace.com/t/dql-to-filter-problem-events-by-alerting-profile/43355)

<div class="topic-metadata">

**Author:** [@dneimke](https://community.dynatrace.com/u/dneimke)\
**Replies:** 4\
**Last updated:** [December 24, 2023, 12:24pm UTC](https://community.dynatrace.com/t/dql-to-filter-problem-events-by-alerting-profile/43355 "2023-12-24T12:24:08Z")

</div>

I have a DQL query that returns a list of events for problem records which looks like this: fetch events, from:now()-30d, to:now() | filter event.kind == "DAVIS\_PROBLEM" | filter contains(event.name, "database connect…

---

## [Fetch logs from all hosts with a Tag](https://community.dynatrace.com/t/fetch-logs-from-all-hosts-with-a-tag/43296)

<div class="topic-metadata">

**Author:** [@S\_Hadley1138](https://community.dynatrace.com/u/S_Hadley1138)\
**Replies:** 14\
**Last updated:** [December 22, 2023, 8:57am UTC](https://community.dynatrace.com/t/fetch-logs-from-all-hosts-with-a-tag/43296 "2023-12-22T08:57:40Z")

</div>

Hi there, I’m a newbie, so please don’t flame me. I’m trying to get the logs from all hosts that have a certain Tag… i can get the hosts, but them how do i feed that to a fetch logs ? fetch dt.entity.host | filter ma…

---

## [Adding K8s labels to log lines](https://community.dynatrace.com/t/adding-k8s-labels-to-log-lines/43301)

<div class="topic-metadata">

**Author:** [@gilgi](https://community.dynatrace.com/u/gilgi)\
**Replies:** 1\
**Last updated:** [December 20, 2023, 11:46am UTC](https://community.dynatrace.com/t/adding-k8s-labels-to-log-lines/43301 "2023-12-20T11:46:40Z")

</div>

Hi All, We have a use case in which we want to add the value of a specific k8s workload label to the log lines of the relevant pods. My questions is actually very simple: on which grail “table” is it stored? Gil.

---

## [Calender-aware durations in DQL](https://community.dynatrace.com/t/calender-aware-durations-in-dql/43247)

<div class="topic-metadata">

**Author:** [@r\_weber](https://community.dynatrace.com/u/r_weber)\
**Replies:** 1\
**Last updated:** [December 18, 2023, 10:50am UTC](https://community.dynatrace.com/t/calender-aware-durations-in-dql/43247 "2023-12-18T10:50:29Z")

</div>

Likely more an RFE than a question… Currently DQL only supports duration types of “ns” to “d” (here). However especially with BizEvents you want to have something like calendar/week/month-aware durations and timeframes…

---

## [DQL language in notepad++ ?](https://community.dynatrace.com/t/dql-language-in-notepad/43217)

<div class="topic-metadata">

**Author:** [@Christophe\_N](https://community.dynatrace.com/u/Christophe_N)\
**Replies:** 3\
**Last updated:** [December 18, 2023, 9:17am UTC](https://community.dynatrace.com/t/dql-language-in-notepad/43217 "2023-12-18T09:17:24Z")

</div>

Hi, Maybe you are Notepad++ enjoyer like me, and you are addict to it , so you use it basically for copy-pasting everything as to edit it easily ? I was wondering if someone already created the language file for DQL so…

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

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