# I would like to create a notebook query in order to check for the average lock time a specific service is experiencing

**URL:** <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>\
**Category:** DQL\
**Tags:** dql, notebooks\
**Created:** [December 21, 2023, 8:47am 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 "2023-12-21T08:47:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SharonGellerTip](https://avatars.discourse-cdn.com/v4/letter/s/c0e974/32.png) [@SharonGellerTip](https://community.dynatrace.com/u/SharonGellerTip)\
**Post date:** [December 21, 2023, 8:47am 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/1 "2023-12-21T08:47:32Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![LukeHearth](https://avatars.discourse-cdn.com/v4/letter/l/41988e/32.png) [@LukeHearth](https://community.dynatrace.com/u/LukeHearth)\
**Post date:** [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/2 "2024-01-03T16:41:22Z")

</div>

Hi&nbsp;[@SharonGellerTip](https://community.dynatrace.com/user/70112)

It may be that the metric you are looking for might not be available in Grail as of yet you can allways check what we have available as built in metrics&nbsp;[here](https://docs.dynatrace.com/docs/observe-and-explore/metrics/built-in-metrics-on-grail)

If you do find that the metric you are looking for is in that list then you can write some DQL like this to get the result you are looking for:&nbsp;timeseries Lock\_Time=avg(\<metric\_name\>)

Here is an example of querying avg CPU consumption:

timeseries cpu=avg(dt.host.cpu.usage)

 ![luke_hearth_0-1704300058380.png](https://global.discourse-cdn.com/dynatrace/original/3X/1/e/1ef614d3ad739c334dc9a77e468bc82ef5c58cd3.png)
