# How to extract field from log  in Log monitoring V2

**URL:** <https://community.dynatrace.com/t/how-to-extract-field-from-log-in-log-monitoring-v2/33925>\
**Category:** Logs\
**Tags:** log-monitoring-class\
**Created:** [January 29, 2022, 4:45pm UTC](https://community.dynatrace.com/t/how-to-extract-field-from-log-in-log-monitoring-v2/33925 "2022-01-29T16:45:38Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![dcappare](https://avatars.discourse-cdn.com/v4/letter/d/6f9a4e/32.png) [@dcappare](https://community.dynatrace.com/u/dcappare)\
**Post date:** [January 29, 2022, 4:45pm UTC](https://community.dynatrace.com/t/how-to-extract-field-from-log-in-log-monitoring-v2/33925/1 "2022-01-29T16:45:38Z")

</div>

I’m new in the community and in the use of Dynatrace.

There is someway to extract specific fields in a custom trace log.

I associate the custom log to the process but I don’t find a way to extract and create a custom field.

For example if I have a logfile with these line pattern:

25/01/2021 ORD1234 OK

Is there some way to identify the&nbsp;ORD1234&nbsp; as NrOrder and OK as Result fields to use in the search text for post processing?

Thank’s a lot for helping me

---

<div class="post-metadata">

**Author:** ![Babar\_Qayyum](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/babar_qayyum/32/13620_2.png) [@Babar\_Qayyum](https://community.dynatrace.com/u/Babar_Qayyum)\
**Post date:** [January 30, 2022, 7:12am UTC](https://community.dynatrace.com/t/how-to-extract-field-from-log-in-log-monitoring-v2/33925/2 "2022-01-30T07:12:43Z")

</div>

Hello&nbsp;[@dcappare](https://community.dynatrace.com/user/47513)

If you are looking for the log custom attributes. Please have a look at the below link:

> **[Log custom attributes](https://docs.dynatrace.com/docs/analyze-explore-automate/log-monitoring/analyze-log-data/log-custom-attributes-classic)**
>
> Create and use custom attributes during log data ingestion.

Regards,

Babar

---

<div class="post-metadata">

**Author:** ![dcappare](https://avatars.discourse-cdn.com/v4/letter/d/6f9a4e/32.png) [@dcappare](https://community.dynatrace.com/u/dcappare)\
**Post date:** [January 30, 2022, 7:26am UTC](https://community.dynatrace.com/t/how-to-extract-field-from-log-in-log-monitoring-v2/33925/3 "2022-01-30T07:26:00Z")

</div>

Hi Babar,

thank for your reply. I have some doubt because in this article it seems that the custom metric is to built only for json log &nbsp;but i don’ t understand if this is possible for log4Net , log4j or custom log defining some rule or regular expr to extract a specific field as a metric.&nbsp;  
thanks a lot for your support

---

<div class="post-metadata">

**Author:** ![HansLougas](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/hanslougas/32/23712_2.png) [@HansLougas](https://community.dynatrace.com/u/HansLougas)\
**Post date:** [February 1, 2022, 12:02pm UTC](https://community.dynatrace.com/t/how-to-extract-field-from-log-in-log-monitoring-v2/33925/4 "2022-02-01T12:02:23Z")

</div>

Hi dcappare,

You are correct, you can create custom metrics from API ingested logs in JSON at the moment.

Extracting specific fields from plaintext logs will be available soon!

Best regards,

Hans

---

<div class="post-metadata">

**Author:** ![mathias\_indermu](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mathias_indermu/32/7162_2.png) [@mathias\_indermu](https://community.dynatrace.com/u/mathias_indermu)\
**Post date:** [February 3, 2022, 1:26pm UTC](https://community.dynatrace.com/t/how-to-extract-field-from-log-in-log-monitoring-v2/33925/5 "2022-02-03T13:26:44Z")

</div>

“Extracting specific fields from plaintext logs will be available soon!”  
Any information on which release it is planned? Looking forward to it too.

---

<div class="post-metadata">

**Author:** ![HansLougas](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/hanslougas/32/23712_2.png) [@HansLougas](https://community.dynatrace.com/u/HansLougas)\
**Post date:** [February 4, 2022, 9:19am UTC](https://community.dynatrace.com/t/how-to-extract-field-from-log-in-log-monitoring-v2/33925/6 "2022-02-04T09:19:27Z")

</div>

Most precise information will definitely be in the [release notes](https://www.dynatrace.com/support/help/whats-new/release-notes), but the team will post here too when a release time is certain-

---

<div class="post-metadata">

**Author:** ![jegron](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/jegron/32/12797_2.png) [@jegron](https://community.dynatrace.com/u/jegron)\
**Post date:** [May 2, 2022, 11:56am UTC](https://community.dynatrace.com/t/how-to-extract-field-from-log-in-log-monitoring-v2/33925/7 "2022-05-02T11:56:58Z")

</div>

[@HansLougas](https://community.dynatrace.com/user/45442)&nbsp;: Do you have an ETA for this feature ?

---

<div class="post-metadata">

**Author:** ![HansLougas](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/hanslougas/32/23712_2.png) [@HansLougas](https://community.dynatrace.com/u/HansLougas)\
**Post date:** [May 2, 2022, 12:52pm UTC](https://community.dynatrace.com/t/how-to-extract-field-from-log-in-log-monitoring-v2/33925/8 "2022-05-02T12:52:09Z")

</div>

Hi, I am eager to share a specific ETA, but currently asking to please hold.

I will keep this thread posted as soon as we have ETA.

---

<div class="post-metadata">

**Author:** ![mathias\_indermu](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mathias_indermu/32/7162_2.png) [@mathias\_indermu](https://community.dynatrace.com/u/mathias_indermu)\
**Post date:** [May 9, 2022, 7:12am UTC](https://community.dynatrace.com/t/how-to-extract-field-from-log-in-log-monitoring-v2/33925/9 "2022-05-09T07:12:56Z")

</div>

Here are some promises and an outlook:

[![](https://global.discourse-cdn.com/dynatrace/original/3X/c/8/c8f4fd1ae8156696fd75238044f0590f64ec2b07.jpeg "Log Analytics with Dynatrace – Update May 2022") ](https://www.youtube.com/watch?v=J_y_NVWwjUc)

---

<div class="post-metadata">

**Author:** ![HansLougas](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/hanslougas/32/23712_2.png) [@HansLougas](https://community.dynatrace.com/u/HansLougas)\
**Post date:** [May 9, 2022, 9:12am UTC](https://community.dynatrace.com/t/how-to-extract-field-from-log-in-log-monitoring-v2/33925/10 "2022-05-09T09:12:59Z")

</div>

Thanks for posting this here also Mathias!

I recommend watching through the whole Observability Clinic session, but if you’re curious about extracting fields from log record, [see from&nbsp;53:26](https://youtu.be/J_y_NVWwjUc?t=3206).

---

<div class="post-metadata">

**Author:** ![HansLougas](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/hanslougas/32/23712_2.png) [@HansLougas](https://community.dynatrace.com/u/HansLougas)\
**Post date:** [May 31, 2022, 9:23am UTC](https://community.dynatrace.com/t/how-to-extract-field-from-log-in-log-monitoring-v2/33925/11 "2022-05-31T09:23:43Z")

</div>

Hi all,

I’m happy to share that Log Processing has been released in Preview in Dynatrace 1.242.

[Please see this feedback channel for more details](https://community.dynatrace.com/topic/187442).

---

<div class="post-metadata">

**Author:** ![sundarv1](https://avatars.discourse-cdn.com/v4/letter/s/65b543/32.png) [@sundarv1](https://community.dynatrace.com/u/sundarv1)\
**Post date:** [April 18, 2024, 2:18pm UTC](https://community.dynatrace.com/t/how-to-extract-field-from-log-in-log-monitoring-v2/33925/12 "2024-04-18T14:18:43Z")

</div>

Hi Babar

log.source= “/opt/jboss/var/main.log” AND (content=“error” OR content=“ERROR” OR content=“warning” OR content=“Warning”) - this is our log source. we want to get alert only if first line of content starts with error.

With the above setting, it is generating alerts when there is word “ERROR” in the entire log file
