03 Oct 2024 10:46 PM - last edited on 04 Oct 2024 07:48 AM by MaciejNeumann
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 (
04 Oct 2024 12:52 AM
I think you should use the ==
can you please try changing
log.source == "mytest" and matchesPhrase(content, "Some text")
04 Oct 2024 01:03 AM
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.
04 Oct 2024 02:02 AM
I tried to do something similar and it does not throw a error in SaaS.
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
04 Oct 2024 05:38 AM
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.