# DQL

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

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

**Page:** 23

---

## [Filter dynamic time range](https://community.dynatrace.com/t/filter-dynamic-time-range/40005)

<div class="topic-metadata">

**Author:** [@stefan\_eggersto](https://community.dynatrace.com/u/stefan_eggersto)\
**Replies:** 2\
**Last updated:** [June 3, 2024, 5:45am UTC](https://community.dynatrace.com/t/filter-dynamic-time-range/40005 "2024-06-03T05:45:20Z")

</div>

Is it possible to filter the time with a time range only, e.g. from 5:30am yesterday to 5:30am today?

---

## [makeTimeseries from DQL to chart EC2 instances used by Kubernetes](https://community.dynatrace.com/t/maketimeseries-from-dql-to-chart-ec2-instances-used-by-kubernetes/45740)

<div class="topic-metadata">

**Author:** [@roberto\_camp1](https://community.dynatrace.com/u/roberto_camp1)\
**Replies:** 2\
**Last updated:** [May 26, 2024, 4:21pm UTC](https://community.dynatrace.com/t/maketimeseries-from-dql-to-chart-ec2-instances-used-by-kubernetes/45740 "2024-05-26T16:21:56Z")

</div>

I have the following DQL query that I would like visualize as a simple bar or donut chart, to display the ec2 instance types of the worker nodes in my EKS cluster at any give time. We have multiple EKS clusters in sever…

---

## [Looking to get help with DQL](https://community.dynatrace.com/t/looking-to-get-help-with-dql/45742)

<div class="topic-metadata">

**Author:** [@MAYUMUKHERJEE](https://community.dynatrace.com/u/MAYUMUKHERJEE)\
**Replies:** 1\
**Last updated:** [May 25, 2024, 8:27am UTC](https://community.dynatrace.com/t/looking-to-get-help-with-dql/45742 "2024-05-25T08:27:15Z")

</div>

I am using Dynatrace to monitor Salesforce using Salesforce Insight app connector. I have a scheduled workflow which scans BIZEVENTS to find list of specific user’s login count in last 1 hr. The query I have is: fetch…

---

## [filter for Kubernetes label key](https://community.dynatrace.com/t/filter-for-kubernetes-label-key/45604)

<div class="topic-metadata">

**Author:** [@roberto\_camp1](https://community.dynatrace.com/u/roberto_camp1)\
**Replies:** 2\
**Last updated:** [May 22, 2024, 2:11pm UTC](https://community.dynatrace.com/t/filter-for-kubernetes-label-key/45604 "2024-05-22T14:11:45Z")

</div>

I have the following DQL started to detect k8s Deployments with a certain label : \`\`\` fetch dt.entity.cloud\_application, from: -30m | fields id, workload.id = id, workload.name = entity.name, workload.type = arrayFirst…

---

## [Looking for suggestions related to DQL](https://community.dynatrace.com/t/looking-for-suggestions-related-to-dql/45664)

<div class="topic-metadata">

**Author:** [@harry22](https://community.dynatrace.com/u/harry22)\
**Replies:** 4\
**Last updated:** [May 21, 2024, 8:55pm UTC](https://community.dynatrace.com/t/looking-for-suggestions-related-to-dql/45664 "2024-05-21T20:55:00Z")

</div>

Hi All, I am looking for a way to find below details using DQL. Please suggest: 1. How to get the management zones of the open problems? I tried below but it did not work: fetch events | filter event.kind == "DAVIS\_PR…

---

## [Use Regex in Dynatrace DQL Queries for Advanced Filtering](https://community.dynatrace.com/t/use-regex-in-dynatrace-dql-queries-for-advanced-filtering/45582)

<div class="topic-metadata">

**Author:** [@ppaulogustavoem](https://community.dynatrace.com/u/ppaulogustavoem)\
**Replies:** 1\
**Last updated:** [May 20, 2024, 11:40am UTC](https://community.dynatrace.com/t/use-regex-in-dynatrace-dql-queries-for-advanced-filtering/45582 "2024-05-20T11:40:33Z")

</div>

Summary: Dynatrace Query Language (DQL) supports regex for advanced filtering and pattern matching. This thread explains syntax, examples, and best practices for using regex in log and metric queries. Hey folks! DQL is…

---

## [timeseries avg($metric)](https://community.dynatrace.com/t/timeseries-avg-metric/45636)

<div class="topic-metadata">

**Author:** [@henk\_stobbe](https://community.dynatrace.com/u/henk_stobbe)\
**Replies:** 1\
**Last updated:** [May 20, 2024, 11:26am UTC](https://community.dynatrace.com/t/timeseries-avg-metric/45636 "2024-05-20T11:26:46Z")

</div>

Hello, Var $metric is a existing metric, does anybody know how to make this work? Or can this not de done? KR Henk

---

## [Entity retention in Grail](https://community.dynatrace.com/t/entity-retention-in-grail/45594)

<div class="topic-metadata">

**Author:** [@henk\_stobbe](https://community.dynatrace.com/u/henk_stobbe)\
**Replies:** 3\
**Last updated:** [May 18, 2024, 9:07am UTC](https://community.dynatrace.com/t/entity-retention-in-grail/45594 "2024-05-18T09:07:45Z")

</div>

Hello, Does anybody know when a (smartscape) entity is removed from grail? I would expect after 72 hours. And are all relations to it automatically removed? KR Henk

---

## [Trying to get a single value from the difference of 2 timeseries values, same dimensions, different values...](https://community.dynatrace.com/t/trying-to-get-a-single-value-from-the-difference-of-2-timeseries-values-same-dimensions-different-values/45637)

<div class="topic-metadata">

**Author:** [@calogajac](https://community.dynatrace.com/u/calogajac)\
**Replies:** 2\
**Last updated:** [May 17, 2024, 1:06pm UTC](https://community.dynatrace.com/t/trying-to-get-a-single-value-from-the-difference-of-2-timeseries-values-same-dimensions-different-values/45637 "2024-05-17T13:06:43Z")

</div>

I’ve been working to create a single value block on a notebook where I’m fetching two different timeseries values that use the same metric. The dimensions on this metric are by environment and region (region meaning the …

---

## [Creating Custom Metric For Database Queries](https://community.dynatrace.com/t/creating-custom-metric-for-database-queries/45634)

<div class="topic-metadata">

**Author:** [@kasdev](https://community.dynatrace.com/u/kasdev)\
**Replies:** 1\
**Last updated:** [May 16, 2024, 10:03pm UTC](https://community.dynatrace.com/t/creating-custom-metric-for-database-queries/45634 "2024-05-16T22:03:11Z")

</div>

Hello. I want to see database queries via custom metric if its possible. Anyone has an idea for how to achieve it?

---

## [Is an optional filter using variable possible?](https://community.dynatrace.com/t/is-an-optional-filter-using-variable-possible/45539)

<div class="topic-metadata">

**Author:** [@hfdku](https://community.dynatrace.com/u/hfdku)\
**Replies:** 3\
**Last updated:** [May 15, 2024, 5:37am UTC](https://community.dynatrace.com/t/is-an-optional-filter-using-variable-possible/45539 "2024-05-15T05:37:14Z")

</div>

Imagine I have logs coming from a Kubernetes cluster which I can retrieve successfully with this: fetch logs | filter k8s.namespace.name == "some-namespace-here" | filter matchesPhrase(content, "someValue") I can also …

---

## [DQL query for SSL certificates - Notebooks](https://community.dynatrace.com/t/dql-query-for-ssl-certificates-notebooks/41722)

<div class="topic-metadata">

**Author:** [@Maelam](https://community.dynatrace.com/u/Maelam)\
**Replies:** 3\
**Last updated:** [May 14, 2024, 6:53pm UTC](https://community.dynatrace.com/t/dql-query-for-ssl-certificates-notebooks/41722 "2024-05-14T18:53:26Z")

</div>

Hi there, I need help querying SSL certificates with exp\_days == 30 and set that as warning and exp\_days == 10 critical

---

## [Calculate Percentages in Dynatrace DQL Queries](https://community.dynatrace.com/t/calculate-percentages-in-dynatrace-dql-queries/45557)

<div class="topic-metadata">

**Author:** [@hfdku](https://community.dynatrace.com/u/hfdku)\
**Replies:** 3\
**Last updated:** [May 14, 2024, 7:51am UTC](https://community.dynatrace.com/t/calculate-percentages-in-dynatrace-dql-queries/45557 "2024-05-14T07:51:19Z")

</div>

Given two fields: genCount = 2 vecEmbeddingCount = 2 I want to calculate the percentage of genCount of the total (ie. The result I’m looking for is 50%). fetch logs ... | fieldsAdd totalCount = genCount + vecEmbeddin…

---

## [Group Time Series by Month or Year](https://community.dynatrace.com/t/group-time-series-by-month-or-year/45545)

<div class="topic-metadata">

**Author:** [@JhonU](https://community.dynatrace.com/u/JhonU)\
**Replies:** 1\
**Last updated:** [May 13, 2024, 9:51pm UTC](https://community.dynatrace.com/t/group-time-series-by-month-or-year/45545 "2024-05-13T21:51:04Z")

</div>

Hi, maybe this is a simple thing but I’m just starting out in the world of Dynatrace DQL. I have a time series timeseries fd=sum(cloud.aws.cloudfront.requests\_sum\_by\_region) and I need to analyze the seasonality, for t…

---

## [Notebook query](https://community.dynatrace.com/t/notebook-query/39407)

<div class="topic-metadata">

**Author:** [@Stephen1\_Lee](https://community.dynatrace.com/u/Stephen1_Lee)\
**Replies:** 6\
**Last updated:** [May 13, 2024, 2:49pm UTC](https://community.dynatrace.com/t/notebook-query/39407 "2024-05-13T14:49:46Z")

</div>

Hi I can see that event.kind == “DAVIS\_PROBLEM” can be used as a filter for notebook events. But can we also filter on the labels. For example in the event, I can see labels.management\_zone:Synthetic So can I add a …

---

## [JSON parsing: fieldsAdd or](https://community.dynatrace.com/t/json-parsing-fieldsadd-or/45333)

<div class="topic-metadata">

**Author:** [@ghfsa](https://community.dynatrace.com/u/ghfsa)\
**Replies:** 3\
**Last updated:** [May 10, 2024, 12:06pm UTC](https://community.dynatrace.com/t/json-parsing-fieldsadd-or/45333 "2024-05-10T12:06:00Z")

</div>

I have a DQL which filters down to one of two possible JSONs: content = {"code":"an\_error\_code","error":{"code":"an\_error\_code","message":"An error message appears here..."} or content = {"level":"error","message":"So…

---

## [Limit Data Volume in Dynatrace DQL Queries](https://community.dynatrace.com/t/limit-data-volume-in-dynatrace-dql-queries/45314)

<div class="topic-metadata">

**Author:** [@Yann\_Buccellato](https://community.dynatrace.com/u/Yann_Buccellato)\
**Replies:** 1\
**Last updated:** [May 10, 2024, 9:00am UTC](https://community.dynatrace.com/t/limit-data-volume-in-dynatrace-dql-queries/45314 "2024-05-10T09:00:37Z")

</div>

Can you launch a DQL query specifying that you only want 4 MB (x amount of MB) of data back?

---

## [Seeking Advice: Exploring DQL vs. Workflow Automation Tools](https://community.dynatrace.com/t/seeking-advice-exploring-dql-vs-workflow-automation-tools/45412)

<div class="topic-metadata">

**Author:** [@geonaute123](https://community.dynatrace.com/u/geonaute123)\
**Replies:** 2\
**Last updated:** [May 10, 2024, 8:21am UTC](https://community.dynatrace.com/t/seeking-advice-exploring-dql-vs-workflow-automation-tools/45412 "2024-05-10T08:21:01Z")

</div>

Hey everyone, I’ve been delving into Document Query Language (DQL) lately, any tips on Dynatrace Query Language (DQL)? Wondering if it’s worth learning thoroughly or if there are tools for automating workflows, like an …

---

## [Span DQL to filter on "Referer"](https://community.dynatrace.com/t/span-dql-to-filter-on-referer/45490)

<div class="topic-metadata">

**Author:** [@ronmacdonald](https://community.dynatrace.com/u/ronmacdonald)\
**Replies:** 2\
**Last updated:** [May 9, 2024, 2:12pm UTC](https://community.dynatrace.com/t/span-dql-to-filter-on-referer/45490 "2024-05-09T14:12:27Z")

</div>

I’m trying to write a dql that will summarize by the “referer” header value. I see an array, “supportability.non\_persisted\_attribute\_keys” that contains http.request.header.referer but it doesn’t provide the value for …

---

## [DQL makeTimeseries by multiple filters and dimensions](https://community.dynatrace.com/t/dql-maketimeseries-by-multiple-filters-and-dimensions/45332)

<div class="topic-metadata">

**Author:** [@zip-chanko](https://community.dynatrace.com/u/zip-chanko)\
**Replies:** 3\
**Last updated:** [May 7, 2024, 5:22pm UTC](https://community.dynatrace.com/t/dql-maketimeseries-by-multiple-filters-and-dimensions/45332 "2024-05-07T17:22:00Z")

</div>

Hello, Is there a way to use the makeTimeseries function which splits the graph by multiple filters. For example, I have logs with attribute httpstatus which shows 2xx, 4xx, 5xx, etc. I would like to see the graph spl…

---

## [Master Dynatrace DQL Basics for Efficient Querying](https://community.dynatrace.com/t/master-dynatrace-dql-basics-for-efficient-querying/45430)

<div class="topic-metadata">

**Author:** [@PickleRick](https://community.dynatrace.com/u/PickleRick)\
**Replies:** 5\
**Last updated:** [May 7, 2024, 1:42pm UTC](https://community.dynatrace.com/t/master-dynatrace-dql-basics-for-efficient-querying/45430 "2024-05-07T13:42:19Z")

</div>

OK, I’m trying to use DQL to monitor my environment for relevant events and insights, we’ve used “Classic” Dynatrace for about a year now and it’s been great. We could immediately see problem databases and applications, …

---

## [DQL makeTimeSeries Table](https://community.dynatrace.com/t/dql-maketimeseries-table/45432)

<div class="topic-metadata">

**Author:** [@angelriosST](https://community.dynatrace.com/u/angelriosST)\
**Replies:** 2\
**Last updated:** [May 6, 2024, 6:23pm UTC](https://community.dynatrace.com/t/dql-maketimeseries-table/45432 "2024-05-06T18:23:04Z")

</div>

I have this code using makeTimeseries, but I want each count value to be displayed in a different row so I can display it as a table or as a bar chart and not in an array in a single row. fetch logs | filter matchesPhr…

---

## [Dynatrace Timestamp vs Log Timestamp, why so different?](https://community.dynatrace.com/t/dynatrace-timestamp-vs-log-timestamp-why-so-different/45418)

<div class="topic-metadata">

**Author:** [@GerryIsHere](https://community.dynatrace.com/u/GerryIsHere)\
**Replies:** 1\
**Last updated:** [May 3, 2024, 6:08am UTC](https://community.dynatrace.com/t/dynatrace-timestamp-vs-log-timestamp-why-so-different/45418 "2024-05-03T06:08:20Z")

</div>

I think this might be Grail question, but anyway, see image below, why are the last timestamps so different?

---

## [Function replace by variable (dropdown selection)](https://community.dynatrace.com/t/function-replace-by-variable-dropdown-selection/45262)

<div class="topic-metadata">

**Author:** [@wbolten](https://community.dynatrace.com/u/wbolten)\
**Replies:** 4\
**Last updated:** [April 24, 2024, 2:41pm UTC](https://community.dynatrace.com/t/function-replace-by-variable-dropdown-selection/45262 "2024-04-24T14:41:56Z")

</div>

Hi, I have a panel with the below timeseries command and it is working. However they would like to be able to change from avg to max, or other ones for that matter and without the need to change the DQL everytime in the…

---

## [DQL DavisAI forecasting tile does not refresh with variable filters](https://community.dynatrace.com/t/dql-davisai-forecasting-tile-does-not-refresh-with-variable-filters/45253)

<div class="topic-metadata">

**Author:** [@marina\_pollehn](https://community.dynatrace.com/u/marina_pollehn)\
**Replies:** 1\
**Last updated:** [April 23, 2024, 1:49pm UTC](https://community.dynatrace.com/t/dql-davisai-forecasting-tile-does-not-refresh-with-variable-filters/45253 "2024-04-23T13:49:39Z")

</div>

We have created a DQL tile, which shows the disk usage per disk and host, also using DavisAI for forecasting. Because we want the tile to be dynamic,we have also added 2 variables for Tags (e.g. only showing all the hos…

---

## [Fetch all available properties](https://community.dynatrace.com/t/fetch-all-available-properties/40021)

<div class="topic-metadata">

**Author:** [@educampver](https://community.dynatrace.com/u/educampver)\
**Replies:** 2\
**Last updated:** [April 21, 2024, 12:11pm UTC](https://community.dynatrace.com/t/fetch-all-available-properties/40021 "2024-04-21T12:11:55Z")

</div>

Hi, Is it possible to fetch a specific entity’s available properties with DQL? Thanks.

---

## [Database calls per Endpoint: error "spans table not accessible"](https://community.dynatrace.com/t/database-calls-per-endpoint-error-spans-table-not-accessible/44466)

<div class="topic-metadata">

**Author:** [@abrunnert](https://community.dynatrace.com/u/abrunnert)\
**Replies:** 1\
**Last updated:** [April 16, 2024, 12:29pm UTC](https://community.dynatrace.com/t/database-calls-per-endpoint-error-spans-table-not-accessible/44466 "2024-04-16T12:29:55Z")

</div>

Hi there, I am trying to use one of the DQL sample query snippets (“Database calls per endpoint as timeseries”) on a Dynatrace SaaS instance. Unfortunately, this snippet doesn’t seem to work at the moment because the sp…

---

## [condition matching in Workflow](https://community.dynatrace.com/t/condition-matching-in-workflow/45085)

<div class="topic-metadata">

**Author:** [@roberto\_camp1](https://community.dynatrace.com/u/roberto_camp1)\
**Replies:** 1\
**Last updated:** [April 15, 2024, 10:46am UTC](https://community.dynatrace.com/t/condition-matching-in-workflow/45085 "2024-04-15T10:46:25Z")

</div>

I am trying to create a Workflow that responds to a DQL query where it seems like the metric is occasionally showing an empty records array. I would like to trigger some specific action if the \`“records”: \[\],\` is presen…

---

## [Cumulative Sum - DQL](https://community.dynatrace.com/t/cumulative-sum-dql/42601)

<div class="topic-metadata">

**Author:** [@davidrodriguez](https://community.dynatrace.com/u/davidrodriguez)\
**Replies:** 4\
**Last updated:** [April 15, 2024, 8:12am UTC](https://community.dynatrace.com/t/cumulative-sum-dql/42601 "2024-04-15T08:12:49Z")

</div>

Is it possible to plot a cumulative sum in DQL? Let’s take for example a graph that shows the count of a metric for the given time. How could we add a second line in the graph, that shows the cumulative sum of the previ…

---

## [Extract IP and Status from CONTENT of dt.system.events to show in a Dashboard](https://community.dynatrace.com/t/extract-ip-and-status-from-content-of-dt-system-events-to-show-in-a-dashboard/44884)

<div class="topic-metadata">

**Author:** [@Raj](https://community.dynatrace.com/u/Raj)\
**Replies:** 2\
**Last updated:** [April 11, 2024, 11:46am UTC](https://community.dynatrace.com/t/extract-ip-and-status-from-content-of-dt-system-events-to-show-in-a-dashboard/44884 "2024-04-11T11:46:32Z")

</div>

Hello All, I have few entries coming in dt.system.events which are coming from SNMP Generic Device extension and wanted to show in a dashboard like below: IP Status 0.0.0.0 ERROR 1.1.1.1 Successful The ent…

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

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