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

Log Metrics Extraction with a contains clause

dcole66
Participant

DQL matcher in logs - Dynatrace Docs

Why can I not, according to the documentation, use:

log.source = "mytest" and matchesPhrase(content, "Some text") to create a log metric from a log file.

I get a LWL Validation error: first invalid character at the (

4 REPLIES 4

p_devulapalli
Champion

I think you should use the ==  

can you please try changing

log.source == "mytest" and matchesPhrase(content, "Some text")

Phani Devulapalli

It wasn't happy about that.    Complaining about the 2nd = symbol.

I note the document is for DQL.  But in the error, this is complaining about LQL.  Are these different?  

This is from the Creation of a log metric page under log monitoring.  On a managed instance (with no grail).  The documentation does not have many references for LQL.

 

 I tried to do something similar and it does not throw a error in SaaS. 

p_devulapalli_0-1728002643994.png

 

Looking at the managed docs , the procedure seems bit different if you are not on grail. Not sure if that's causing the issue here in managed 

https://docs.dynatrace.com/managed/observe-and-explore/log-monitoring/analyze-log-data/log-metrics

 

Phani Devulapalli

Fin_Ubels
Dynatrace Champion
Dynatrace Champion

As Phani mentioned there are some pretty big differences between managed and SaaS. In managed there is no DQL or Grail and there is different documentation available. docs.dynatrace.com is for SaaS whereas docs.dyntrace.com/managed/ is for managed. For the query syntax you can find that here https://docs.dynatrace.com/managed/observe-and-explore/log-monitoring/analyze-log-data/log-viewer#sq...

If a UI element in managed took you to the wrong docs it would be good to raise this with support so that it can be rectified.

Featured Posts