# DQL

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

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

**Page:** 26

---

## [Monitoring a log among 5 minutes on Grail](https://community.dynatrace.com/t/monitoring-a-log-among-5-minutes-on-grail/42493)

<div class="topic-metadata">

**Author:** [@Raul\_CL](https://community.dynatrace.com/u/Raul_CL)\
**Replies:** 3\
**Last updated:** [December 14, 2023, 5:58pm UTC](https://community.dynatrace.com/t/monitoring-a-log-among-5-minutes-on-grail/42493 "2023-12-14T17:58:13Z")

</div>

Hi everyone, Our client needs to monitor a log, where the only thing he needs is to know if the log was written or not, among 5 minutes. If the log didn’t receive any input in 5 minutes, Dynatrace should alert or show a…

---

## [Hostname for Process restart event](https://community.dynatrace.com/t/hostname-for-process-restart-event/42971)

<div class="topic-metadata">

**Author:** [@janne\_olkoniemi](https://community.dynatrace.com/u/janne_olkoniemi)\
**Replies:** 3\
**Last updated:** [December 14, 2023, 12:08pm UTC](https://community.dynatrace.com/t/hostname-for-process-restart-event/42971 "2023-12-14T12:08:24Z")

</div>

Hello, I’m relativity new with DQL and taking my first baby steps with it currently and trying to figure out how to utilize it. One us case I have currently is to list certain process restarts for table and facing some…

---

## [Log processing rule - for each item in json array split on ":" then create fields using split\[0\] as key and split\[1\] as value](https://community.dynatrace.com/t/log-processing-rule-for-each-item-in-json-array-split-on-then-create-fields-using-split-0-as-key-and-split-1-as-value/41110)

<div class="topic-metadata">

**Author:** [@Jack\_Stuart](https://community.dynatrace.com/u/Jack_Stuart)\
**Replies:** 7\
**Last updated:** [December 11, 2023, 3:34pm UTC](https://community.dynatrace.com/t/log-processing-rule-for-each-item-in-json-array-split-on-then-create-fields-using-split-0-as-key-and-split-1-as-value/41110 "2023-12-11T15:34:49Z")

</div>

Hi, I’m having a bit of trouble extracting data from a json array. Would you be able to assist me? for example content={ “some\_array” : \[ “key1:value1”, “key2:value2” \] } Is there a way for me to process each it…

---

## [Parsing rules -- occurrence negation](https://community.dynatrace.com/t/parsing-rules-occurrence-negation/42851)

<div class="topic-metadata">

**Author:** [@MartinBurgos](https://community.dynatrace.com/u/MartinBurgos)\
**Replies:** 4\
**Last updated:** [December 11, 2023, 2:17pm UTC](https://community.dynatrace.com/t/parsing-rules-occurrence-negation/42851 "2023-12-11T14:17:55Z")

</div>

Hi team, I need a helping hand with the following DQL parsing. | PARSE content, " DATA{1,70000}? ( ('tenantId'|'tenant '|'tenant'|'TenantID'|'TenantId'|'tenantID'|'tenant\_id'| 'tenant id'| 'tenant ID'|'Tenant ID'|'Tena…

---

## [How to parse from a log event with many special characters](https://community.dynatrace.com/t/how-to-parse-from-a-log-event-with-many-special-characters/43108)

<div class="topic-metadata">

**Author:** [@cwinkler109](https://community.dynatrace.com/u/cwinkler109)\
**Replies:** 1\
**Last updated:** [December 8, 2023, 4:32pm UTC](https://community.dynatrace.com/t/how-to-parse-from-a-log-event-with-many-special-characters/43108 "2023-12-08T16:32:09Z")

</div>

I am brand new to DT logging and DQL. I am trying to understand how to parse data from logs that have many special characters in the them. Here is a snippet of a log event I am parsing from: \\“{\\“feature\\”:\\“off\\”,\\“lev…

---

## [Nested quotation marks](https://community.dynatrace.com/t/nested-quotation-marks/43052)

<div class="topic-metadata">

**Author:** [@eriknois](https://community.dynatrace.com/u/eriknois)\
**Replies:** 2\
**Last updated:** [December 7, 2023, 8:07am UTC](https://community.dynatrace.com/t/nested-quotation-marks/43052 "2023-12-07T08:07:54Z")

</div>

Hello, I am trying to parse two values from the content field, but ran into a problem with quotation marks. Here’s a shortened version of the record: content:{“contextMap”:{“id:“a1”,“details”:\[”description":“amount”,“g…

---

## [How do I know if the ingested logs are going to the correct bucket?](https://community.dynatrace.com/t/how-do-i-know-if-the-ingested-logs-are-going-to-the-correct-bucket/43033)

<div class="topic-metadata">

**Author:** [@WellPP](https://community.dynatrace.com/u/WellPP)\
**Replies:** 1\
**Last updated:** [December 6, 2023, 8:48am UTC](https://community.dynatrace.com/t/how-do-i-know-if-the-ingested-logs-are-going-to-the-correct-bucket/43033 "2023-12-06T08:48:58Z")

</div>

We are migrating from a third-party tool to Grail. We have already started ingesting logs into the dev tenant. The first question: What syntax can I use in Matcer (DQL) so that 100% of the logs go to the created bucket? …

---

## [Combine Multiple Fetches in Dynatrace Query Language (DQL)](https://community.dynatrace.com/t/combine-multiple-fetches-in-dynatrace-query-language-dql/42285)

<div class="topic-metadata">

**Author:** [@rchillara](https://community.dynatrace.com/u/rchillara)\
**Replies:** 2\
**Last updated:** [November 27, 2023, 2:13pm UTC](https://community.dynatrace.com/t/combine-multiple-fetches-in-dynatrace-query-language-dql/42285 "2023-11-27T14:13:22Z")

</div>

Summary: This article explains how to combine multiple fetch operations in a single DQL query. It includes syntax examples and best practices for optimising queries in Dynatrace dashboards. Hi, What is the syntax to cr…

---

## [Count numbers of entry in a log in Grails](https://community.dynatrace.com/t/count-numbers-of-entry-in-a-log-in-grails/42764)

<div class="topic-metadata">

**Author:** [@Raul\_CL](https://community.dynatrace.com/u/Raul_CL)\
**Replies:** 3\
**Last updated:** [November 22, 2023, 1:47pm UTC](https://community.dynatrace.com/t/count-numbers-of-entry-in-a-log-in-grails/42764 "2023-11-22T13:47:53Z")

</div>

I have a log ingested in Grails where I would like to count the number of entries of each user. The user name is the second column. User names are dynamic, I mean new users could appear daily. USER user1 20231121 12:11…

---

## [Expand Tags values](https://community.dynatrace.com/t/expand-tags-values/42716)

<div class="topic-metadata">

**Author:** [@RPbiaggio](https://community.dynatrace.com/u/RPbiaggio)\
**Replies:** 8\
**Last updated:** [November 20, 2023, 4:15pm UTC](https://community.dynatrace.com/t/expand-tags-values/42716 "2023-11-20T16:15:47Z")

</div>

Guys, I need some help. I have my process group entities with some tags and I need to put two fields in one, one is the value of the tag “\[Kubernetes\]componentid:” and the other, the value of the tag, “env”. I can’t seem…

---

## [Is it possible to create reference metadata table with file upload to use it while enriching log attribute data ?](https://community.dynatrace.com/t/is-it-possible-to-create-reference-metadata-table-with-file-upload-to-use-it-while-enriching-log-attribute-data/42528)

<div class="topic-metadata">

**Author:** [@pallepavan](https://community.dynatrace.com/u/pallepavan)\
**Replies:** 1\
**Last updated:** [November 16, 2023, 8:46pm UTC](https://community.dynatrace.com/t/is-it-possible-to-create-reference-metadata-table-with-file-upload-to-use-it-while-enriching-log-attribute-data/42528 "2023-11-16T20:46:24Z")

</div>

Hi Team, I am looking to enrich log record based on the content available in context. is it possible to use a Reference metadata table by uploading a file or any other way and reference it during log process ? Looking …

---

## [A simple DQL to do a search for an IP to host in Dynatrace.](https://community.dynatrace.com/t/a-simple-dql-to-do-a-search-for-an-ip-to-host-in-dynatrace/42636)

<div class="topic-metadata">

**Author:** [@MarwanC](https://community.dynatrace.com/u/MarwanC)\
**Replies:** 2\
**Last updated:** [November 16, 2023, 12:22pm UTC](https://community.dynatrace.com/t/a-simple-dql-to-do-a-search-for-an-ip-to-host-in-dynatrace/42636 "2023-11-16T12:22:14Z")

</div>

I appreciate a simple DQL to search for a host name given an IP. How simple could it be?

---

## [Parse After Colon](https://community.dynatrace.com/t/parse-after-colon/42159)

<div class="topic-metadata">

**Author:** [@jacob\_norkus](https://community.dynatrace.com/u/jacob_norkus)\
**Replies:** 2\
**Last updated:** [November 14, 2023, 12:56pm UTC](https://community.dynatrace.com/t/parse-after-colon/42159 "2023-11-14T12:56:25Z")

</div>

Hey Team, how do we parse data after a colon? For example here is a snippet from the log "mvcLastloginTimestamp":"1697106375080","thisCustomerNum":"123456789","objectClass": We’re looking to parse out the customerNum w…

---

## [Search and Parse Specific JSON Lists Using Dynatrace DQL](https://community.dynatrace.com/t/search-and-parse-specific-json-lists-using-dynatrace-dql/42561)

<div class="topic-metadata">

**Author:** [@dannemca](https://community.dynatrace.com/u/dannemca)\
**Replies:** 1\
**Last updated:** [November 12, 2023, 4:08pm UTC](https://community.dynatrace.com/t/search-and-parse-specific-json-lists-using-dynatrace-dql/42561 "2023-11-12T16:08:21Z")

</div>

Let me try to explain what I need. I am extracting data using Bizevents, and one of the fields I need is a list inside a Json in response Body. I know that I can parse the json to extract the specific position of that …

---

## [Can't use graph in new UI Dashboard](https://community.dynatrace.com/t/cant-use-graph-in-new-ui-dashboard/42545)

<div class="topic-metadata">

**Author:** [@mark\_forrester](https://community.dynatrace.com/u/mark_forrester)\
**Replies:** 2\
**Last updated:** [November 9, 2023, 5:57pm UTC](https://community.dynatrace.com/t/cant-use-graph-in-new-ui-dashboard/42545 "2023-11-09T17:57:45Z")

</div>

So I have a query to take the last value seen per day for a field monthly requests, this filed is a running total per hour of requests and as the name suggests gets reset every month. fetch bizevents , scanLimitGBytes: …

---

## [Transform String to JSON](https://community.dynatrace.com/t/transform-string-to-json/42454)

<div class="topic-metadata">

**Author:** [@nicoe\_welch](https://community.dynatrace.com/u/nicoe_welch)\
**Replies:** 1\
**Last updated:** [November 3, 2023, 3:42pm UTC](https://community.dynatrace.com/t/transform-string-to-json/42454 "2023-11-03T15:42:58Z")

</div>

Hey team how would I convert a “content” string field into JSON object? The Content field is a “stringified” JSON object, is there a DQL command that would convert this into a JSON object. stdout F preludes the JSON obje…

---

## [Changing affected\_entity\_ids for entity name](https://community.dynatrace.com/t/changing-affected-entity-ids-for-entity-name/42139)

<div class="topic-metadata">

**Author:** [@EnnioCamacho](https://community.dynatrace.com/u/EnnioCamacho)\
**Replies:** 3\
**Last updated:** [October 31, 2023, 4:48pm UTC](https://community.dynatrace.com/t/changing-affected-entity-ids-for-entity-name/42139 "2023-10-31T16:48:54Z")

</div>

Hello! Searching for help with the following, i’m relatively new using DQL. I have the following code, what i want is to display the entity names on the affected\_entity\_ids row, not the id, so far i have tried to change…

---

## [Extracting details from lookup DQL](https://community.dynatrace.com/t/extracting-details-from-lookup-dql/39287)

<div class="topic-metadata">

**Author:** [@kwangxi](https://community.dynatrace.com/u/kwangxi)\
**Replies:** 6\
**Last updated:** [October 30, 2023, 3:27pm UTC](https://community.dynatrace.com/t/extracting-details-from-lookup-dql/39287 "2023-10-30T15:27:19Z")

</div>

Hi, I wanted to extract the type, edition and versions out from the technologies to be different columns in a table as well as do a bar chart specifically for type. "\<strong\>monitoringMode\</strong\>": "FULL\_STACK", "\<st…

---

## [small question about aggregations](https://community.dynatrace.com/t/small-question-about-aggregations/42338)

<div class="topic-metadata">

**Author:** [@henk\_stobbe](https://community.dynatrace.com/u/henk_stobbe)\
**Replies:** 2\
**Last updated:** [October 30, 2023, 1:20pm UTC](https://community.dynatrace.com/t/small-question-about-aggregations/42338 "2023-10-30T13:20:47Z")

</div>

Hello, Does DQL also do “bucket” aggregations? Kr Henk example: x = 4 y =3 z =8 y = 2 x = 2 query would be, as an example: give me the highest number per letter, answer x = 4 y = 3 z = 8 Or a dynatrace exam…

---

## [Log processing rules : how to set newfeild=success by checking if a key exist in Parsed JSON](https://community.dynatrace.com/t/log-processing-rules-how-to-set-newfeild-success-by-checking-if-a-key-exist-in-parsed-json/42166)

<div class="topic-metadata">

**Author:** [@pallepavan](https://community.dynatrace.com/u/pallepavan)\
**Replies:** 1\
**Last updated:** [October 27, 2023, 9:05pm UTC](https://community.dynatrace.com/t/log-processing-rules-how-to-set-newfeild-success-by-checking-if-a-key-exist-in-parsed-json/42166 "2023-10-27T21:05:10Z")

</div>

is it possible to add a field to logs by check if a KEY exist in a Parsed JSON while processing logs, JSON SAMPLE : { “name” : “test” “action” : “some random string” … … } requirement : add a new\_feild as log att…

---

## [Event extraction from logs](https://community.dynatrace.com/t/event-extraction-from-logs/42264)

<div class="topic-metadata">

**Author:** [@henk\_stobbe](https://community.dynatrace.com/u/henk_stobbe)\
**Replies:** 1\
**Last updated:** [October 27, 2023, 8:33pm UTC](https://community.dynatrace.com/t/event-extraction-from-logs/42264 "2023-10-27T20:33:52Z")

</div>

Hello, As seen below, for event extraction in logs, not all DQL parts are valid: Is there a rule of thumb what subset of DQL can be used? Or am I missing something (-; KR Henk

---

## [Parsing a log file with DQL](https://community.dynatrace.com/t/parsing-a-log-file-with-dql/42317)

<div class="topic-metadata">

**Author:** [@Raul\_CL](https://community.dynatrace.com/u/Raul_CL)\
**Replies:** 2\
**Last updated:** [October 26, 2023, 7:28pm UTC](https://community.dynatrace.com/t/parsing-a-log-file-with-dql/42317 "2023-10-26T19:28:27Z")

</div>

Hi everyone I’m new to working with Dynatrace and new in this community. I’m writing you because I’m trying to parse out attributes in a log with DQL (Grail), but I’m having a problem getting a clean value. My log has…

---

## [Grail ingest pipeline quesion](https://community.dynatrace.com/t/grail-ingest-pipeline-quesion/42225)

<div class="topic-metadata">

**Author:** [@henk\_stobbe](https://community.dynatrace.com/u/henk_stobbe)\
**Replies:** 2\
**Last updated:** [October 25, 2023, 9:15am UTC](https://community.dynatrace.com/t/grail-ingest-pipeline-quesion/42225 "2023-10-25T09:15:27Z")

</div>

Hello, Looking at below pipeline in Grail, can I say that, Metric extaction is just a fileter and a count (or attribute value count) would become time series data per minute? Event extraction is also a (simple) filter…

---

## [Parse log data to return full name that has spacing](https://community.dynatrace.com/t/parse-log-data-to-return-full-name-that-has-spacing/42156)

<div class="topic-metadata">

**Author:** [@Maelam](https://community.dynatrace.com/u/Maelam)\
**Replies:** 2\
**Last updated:** [October 18, 2023, 1:44pm UTC](https://community.dynatrace.com/t/parse-log-data-to-return-full-name-that-has-spacing/42156 "2023-10-18T13:44:55Z")

</div>

Hi there, How can parse this content data to include the full name which has a space? here’s the content below: 2023-10-18 13:01:54,750 \[ajp-apr-8109-exec-12\] ERROR csc.fs.stp.ota.lib.action.OverrideSystemErr- Line: 29…

---

## [Querying metrics using DQL metrics.key and metrics selector API](https://community.dynatrace.com/t/querying-metrics-using-dql-metrics-key-and-metrics-selector-api/38635)

<div class="topic-metadata">

**Author:** [@StephenLHChan](https://community.dynatrace.com/u/StephenLHChan)\
**Replies:** 9\
**Last updated:** [October 16, 2023, 6:26pm UTC](https://community.dynatrace.com/t/querying-metrics-using-dql-metrics-key-and-metrics-selector-api/38635 "2023-10-16T18:26:35Z")

</div>

Hey, I am now deciding whether to use metrics API or DQL to query metrics. But now, I am facing a problem that I can’t find some metrics using DQL. (e.g. builtin:host.cpu.load15m) Is that all metrics that can be queri…

---

## [DQL Query Group by Every 2 Hour](https://community.dynatrace.com/t/dql-query-group-by-every-2-hour/42083)

<div class="topic-metadata">

**Author:** [@bddang](https://community.dynatrace.com/u/bddang)\
**Replies:** 1\
**Last updated:** [October 13, 2023, 5:40pm UTC](https://community.dynatrace.com/t/dql-query-group-by-every-2-hour/42083 "2023-10-13T17:40:24Z")

</div>

Hello eveyone! I’m having the DQL statement prepare for customer. currently, they have summarized by every timestamp of the log. Is there a way to group it by every 2-3 hours? fetch logs , scanLimitGBytes: -1 |filter …

---

## [Conditioning on an aggregated value](https://community.dynatrace.com/t/conditioning-on-an-aggregated-value/42063)

<div class="topic-metadata">

**Author:** [@ryan-balcerzak](https://community.dynatrace.com/u/ryan-balcerzak)\
**Replies:** 2\
**Last updated:** [October 12, 2023, 5:55pm UTC](https://community.dynatrace.com/t/conditioning-on-an-aggregated-value/42063 "2023-10-12T17:55:46Z")

</div>

I have a question regarding a query using an If() statement. Query: fetch logs, scanLimitGBytes: -1 | filter matchesPhrase(content,“\*\*\*\*\*\*\*”) OR matchesPhrase(content,“\*\*\*\*\*\*”) | filter matchesPhrase(content,“\*ACCESS…

---

## [Is this a bug? Why does matchesPhrase fail and at the same time contains works?](https://community.dynatrace.com/t/is-this-a-bug-why-does-matchesphrase-fail-and-at-the-same-time-contains-works/42015)

<div class="topic-metadata">

**Author:** [@GerrysR6](https://community.dynatrace.com/u/GerrysR6)\
**Replies:** 5\
**Last updated:** [October 12, 2023, 1:58pm UTC](https://community.dynatrace.com/t/is-this-a-bug-why-does-matchesphrase-fail-and-at-the-same-time-contains-works/42015 "2023-10-12T13:58:38Z")

</div>

Below is my query, which finds results. Note that both dt.kubernetes.event.message and event.name have the same value, which is “Back-off restarting failed container” fetch events | filter event.status != “CLOSED” and …

---

## [Adding a field with a relationship to another field in my query](https://community.dynatrace.com/t/adding-a-field-with-a-relationship-to-another-field-in-my-query/42012)

<div class="topic-metadata">

**Author:** [@Christian\_1](https://community.dynatrace.com/u/Christian_1)\
**Replies:** 2\
**Last updated:** [October 11, 2023, 10:00am UTC](https://community.dynatrace.com/t/adding-a-field-with-a-relationship-to-another-field-in-my-query/42012 "2023-10-11T10:00:13Z")

</div>

I am trying to get a list of all the services affected by Davis problems and then add a field containing the host for each service. This is how I attempted to do it, but the fields that should contain host information ar…

---

## [Add total sales and categorize via dql](https://community.dynatrace.com/t/add-total-sales-and-categorize-via-dql/42019)

<div class="topic-metadata">

**Author:** [@WellPP](https://community.dynatrace.com/u/WellPP)\
**Replies:** 1\
**Last updated:** [October 11, 2023, 7:33am UTC](https://community.dynatrace.com/t/add-total-sales-and-categorize-via-dql/42019 "2023-10-11T07:33:03Z")

</div>

How can I add up the total amount received and categorize by country?

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

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