# Print the metric key in the email alert

**URL:** <https://community.dynatrace.com/t/print-the-metric-key-in-the-email-alert/47013>\
**Category:** Extensions\
**Tags:** databases, oracle, extensions\
**Created:** [August 5, 2024, 5:51pm UTC](https://community.dynatrace.com/t/print-the-metric-key-in-the-email-alert/47013 "2024-08-05T17:51:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![susmita\_k](https://avatars.discourse-cdn.com/v4/letter/s/7993a0/32.png) [@susmita\_k](https://community.dynatrace.com/u/susmita_k)\
**Post date:** [August 5, 2024, 5:51pm UTC](https://community.dynatrace.com/t/print-the-metric-key-in-the-email-alert/47013/1 "2024-08-05T17:51:48Z")

</div>

I’ve created davis anomaly detector for sql extension alerts, and want to print the metric key in the alert email. My query is as below

timeseries metric= avg(`com.dynatrace.extension.sql-oracle.metrickey`), by: {`dt.entity.sql:com_dynatrace_extension_sql-oracle_instance`, instance.name }

and in the email body, I have tried few options like {metric} OR `metric`, but I am not able to get the value of metric. Any help is appreciated.

---

<div class="post-metadata">

**Author:** ![p\_devulapalli](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/p_devulapalli/32/41590_2.png) [@p\_devulapalli](https://community.dynatrace.com/u/p_devulapalli)\
**Post date:** [August 6, 2024, 6:20am UTC](https://community.dynatrace.com/t/print-the-metric-key-in-the-email-alert/47013/2 "2024-08-06T06:20:29Z")

</div>

I assume you might be referring to the problem notifications, you might need to use one of the available placeholders for the email body

> **[Dynatrace Blog](https://www.dynatrace.com/news/blog/)**
>
> Stay updated on the latest news on observability, automation, AI, and app security. Look here for actionable insights for optimizing your digital ecosystem.

---

<div class="post-metadata">

**Author:** ![susmita\_k](https://avatars.discourse-cdn.com/v4/letter/s/7993a0/32.png) [@susmita\_k](https://community.dynatrace.com/u/susmita_k)\
**Post date:** [August 22, 2024, 6:31pm UTC](https://community.dynatrace.com/t/print-the-metric-key-in-the-email-alert/47013/3 "2024-08-22T18:31:50Z")

</div>

For e.g I have set up an alert based on cpu usage 80% and I want to print actual cpu usage in the problem alert notification. But I could not find a placeholder for the metric key..

---

<div class="post-metadata">

**Author:** ![p\_devulapalli](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/p_devulapalli/32/41590_2.png) [@p\_devulapalli](https://community.dynatrace.com/u/p_devulapalli)\
**Post date:** [August 23, 2024, 1:07am UTC](https://community.dynatrace.com/t/print-the-metric-key-in-the-email-alert/47013/4 "2024-08-23T01:07:34Z")

</div>

ProblemDetails placeholder should give the details you are looking for , have you tried it?

---

<div class="post-metadata">

**Author:** ![susmita\_k](https://avatars.discourse-cdn.com/v4/letter/s/7993a0/32.png) [@susmita\_k](https://community.dynatrace.com/u/susmita_k)\
**Post date:** [August 23, 2024, 8:51pm UTC](https://community.dynatrace.com/t/print-the-metric-key-in-the-email-alert/47013/5 "2024-08-23T20:51:21Z")

</div>

Yes I have&nbsp;{ProblemDetailsHTML} placeholder in my email body, which does not print the metric value.
