# Create log metric with custom dimension

**URL:** <https://community.dynatrace.com/t/create-log-metric-with-custom-dimension/45733>\
**Category:** Alerting\
**Tags:** anomaly-detection, problems-classic\
**Created:** [May 23, 2024, 11:21am UTC](https://community.dynatrace.com/t/create-log-metric-with-custom-dimension/45733 "2024-05-23T11:21:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![henk\_stobbe](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/henk_stobbe/32/30434_2.png) [@henk\_stobbe](https://community.dynatrace.com/u/henk_stobbe)\
**Post date:** [May 23, 2024, 11:21am UTC](https://community.dynatrace.com/t/create-log-metric-with-custom-dimension/45733/1 "2024-05-23T11:21:27Z")

</div>

Hello all,

I want to add a log metric with a custom dimension. I figured out that you need a log processing rule with a matcher and a processor. So far so good. But what will be the new dim name?

Use case example, monitor if there are more then x failed login attempts from a specific IP =\> need IP as a dimension as input for the metric event?

Any suggestion please?

KR Henk

---

<div class="post-metadata">

**Author:** ![Malaik](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/malaik/32/32673_2.png) [@Malaik](https://community.dynatrace.com/u/Malaik)\
**Post date:** [May 23, 2024, 12:09pm UTC](https://community.dynatrace.com/t/create-log-metric-with-custom-dimension/45733/2 "2024-05-23T12:09:44Z")

</div>

Hi&nbsp;[@henk\_stobbe](https://community.dynatrace.com/user/11427)

If you want to add a dimension,

in the metric extraction you should add it:

 ![Malaik_0-1716466130371.png](https://global.discourse-cdn.com/dynatrace/original/1X/e163f99183f7603fe2d990b3833b7921844eb355.png)

---

<div class="post-metadata">

**Author:** ![henk\_stobbe](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/henk_stobbe/32/30434_2.png) [@henk\_stobbe](https://community.dynatrace.com/u/henk_stobbe)\
**Post date:** [May 23, 2024, 12:42pm UTC](https://community.dynatrace.com/t/create-log-metric-with-custom-dimension/45733/3 "2024-05-23T12:42:27Z")

</div>

Hi Malaik,

Thanks for your reply, but what todo if the dimension is not on the list?

KR Henk

---

<div class="post-metadata">

**Author:** ![Malaik](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/malaik/32/32673_2.png) [@Malaik](https://community.dynatrace.com/u/Malaik)\
**Post date:** [May 23, 2024, 1:00pm UTC](https://community.dynatrace.com/t/create-log-metric-with-custom-dimension/45733/4 "2024-05-23T13:00:58Z")

</div>

Hi,

You Should create it as an attribute,

Or from the processing rules.
