cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to extract field from log in Log monitoring V2

dcappare
Participant

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 ORD1234  as NrOrder and OK as Result fields to use in the search text for post processing?

 

Thank's a lot for helping me

 

 

11 REPLIES 11

Babar_Qayyum
DynaMight Guru
DynaMight Guru

Hello @dcappare 

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

https://www.dynatrace.com/support/help/how-to-use-dynatrace/log-monitoring/log-monitoring-v2/log-cus...

Regards,

Babar

 

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  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. 
thanks a lot for your support

 

 

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

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

Most precise information will definitely be in the release notes, but the team will post here too when a release time is certain-

jegron
DynaMight Champion
DynaMight Champion

@HansLougas : Do you have an ETA for this feature ?

Observability Engineer at Phenisys - Dynatrace Professional

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.

Here are some promises and an outlook:

https://youtu.be/J_y_NVWwjUc

Dynatrace's Intelligent Log Analytics combines logs with other data sources including metrics, traces, real user data, all in context with dependency mapping, for smarter AI-powered full-stack observability that delivers answers and continuous automation. Watch this tutorial with Josh Lange, ACE ...

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 53:26.

Dynatrace's Intelligent Log Analytics combines logs with other data sources including metrics, traces, real user data, all in context with dependency mapping, for smarter AI-powered full-stack observability that delivers answers and continuous automation. Watch this tutorial with Josh Lange, ACE ...

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

HansLougas
Dynatrace Helper
Dynatrace Helper

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.

Featured Posts