<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Why is this so hard -- Simple log parsing in DQL</title>
    <link>https://community.dynatrace.com/t5/DQL/Why-is-this-so-hard-Simple-log-parsing/m-p/301229#M3398</link>
    <description>&lt;P&gt;Sometimes this works, sometimes it does not.... and quite frankly, the documentation is not helpful. Here is a log entry:&lt;/P&gt;
&lt;P&gt;Jun 25 15:31:20 HOSTNAME CEF:0|Netwrix|Activity Monitor|9.0.1477|Windows File SystemReadTrueFalse|FileMonitor|3|rt=2026-06-25 15:31:20.431 sntdom=MYDOMAIN suser=MYDOMAIN\asmith src=192.168.241.12 duser=&lt;U&gt;&lt;STRONG&gt;C:\cycfgvol1\DEMProfile10\asmith\Desktop\MyCo Service Portal.lnk&lt;/STRONG&gt;&lt;/U&gt; shost=MYCONETNAS01 msg=Policy Name= FileMonitor Object Class= Success= True Blocked= False Attribute Name= New Attribute Value= Old Attribute Value= Operation= Read&lt;/P&gt;
&lt;P&gt;The part that is bold and underlined is what I want to extract. Below is the DQL query I'm presently attempting to use (I get null values)&lt;/P&gt;
&lt;P&gt;fetch logs&lt;BR /&gt;| parse content,"'duser= ' ALNUM:fPath 'shost="&lt;BR /&gt;| filter ((matchesValue(dt.ingest.source.ip, "192.168.2.88")))&lt;/P&gt;
&lt;P&gt;I've also tried:&lt;/P&gt;
&lt;P&gt;fetch logs&lt;BR /&gt;| parse content,"LD:text 'duser= ' LD{0,255}:thread1 'shost='"&lt;BR /&gt;| filter ((matchesValue(dt.ingest.source.ip, "192.168.2.88")))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and the weird part, parsing another string out of the log line, this works...&lt;/P&gt;
&lt;P&gt;fetch logs&lt;BR /&gt;| parse content, "LD:text '|Windows File' LD{0,100}:PureCommand '|'"&lt;BR /&gt;| fields PureCommand, dt.ingest.source.ip, content&lt;BR /&gt;| filter ((matchesValue(dt.ingest.source.ip, "10.20.11.88")) )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ideally, I would like to extract both fields in the same DQL query.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;P.S. - if anyone has a "real" source of documentation for parse and DPL I'd be very interested in it... the 2 pages in the official doc's are sorely lacking.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you in advance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 26 Jun 2026 06:30:58 GMT</pubDate>
    <dc:creator>jim_hinze</dc:creator>
    <dc:date>2026-06-26T06:30:58Z</dc:date>
    <item>
      <title>Why is this so hard -- Simple log parsing</title>
      <link>https://community.dynatrace.com/t5/DQL/Why-is-this-so-hard-Simple-log-parsing/m-p/301229#M3398</link>
      <description>&lt;P&gt;Sometimes this works, sometimes it does not.... and quite frankly, the documentation is not helpful. Here is a log entry:&lt;/P&gt;
&lt;P&gt;Jun 25 15:31:20 HOSTNAME CEF:0|Netwrix|Activity Monitor|9.0.1477|Windows File SystemReadTrueFalse|FileMonitor|3|rt=2026-06-25 15:31:20.431 sntdom=MYDOMAIN suser=MYDOMAIN\asmith src=192.168.241.12 duser=&lt;U&gt;&lt;STRONG&gt;C:\cycfgvol1\DEMProfile10\asmith\Desktop\MyCo Service Portal.lnk&lt;/STRONG&gt;&lt;/U&gt; shost=MYCONETNAS01 msg=Policy Name= FileMonitor Object Class= Success= True Blocked= False Attribute Name= New Attribute Value= Old Attribute Value= Operation= Read&lt;/P&gt;
&lt;P&gt;The part that is bold and underlined is what I want to extract. Below is the DQL query I'm presently attempting to use (I get null values)&lt;/P&gt;
&lt;P&gt;fetch logs&lt;BR /&gt;| parse content,"'duser= ' ALNUM:fPath 'shost="&lt;BR /&gt;| filter ((matchesValue(dt.ingest.source.ip, "192.168.2.88")))&lt;/P&gt;
&lt;P&gt;I've also tried:&lt;/P&gt;
&lt;P&gt;fetch logs&lt;BR /&gt;| parse content,"LD:text 'duser= ' LD{0,255}:thread1 'shost='"&lt;BR /&gt;| filter ((matchesValue(dt.ingest.source.ip, "192.168.2.88")))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and the weird part, parsing another string out of the log line, this works...&lt;/P&gt;
&lt;P&gt;fetch logs&lt;BR /&gt;| parse content, "LD:text '|Windows File' LD{0,100}:PureCommand '|'"&lt;BR /&gt;| fields PureCommand, dt.ingest.source.ip, content&lt;BR /&gt;| filter ((matchesValue(dt.ingest.source.ip, "10.20.11.88")) )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ideally, I would like to extract both fields in the same DQL query.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;P.S. - if anyone has a "real" source of documentation for parse and DPL I'd be very interested in it... the 2 pages in the official doc's are sorely lacking.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you in advance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jun 2026 06:30:58 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Why-is-this-so-hard-Simple-log-parsing/m-p/301229#M3398</guid>
      <dc:creator>jim_hinze</dc:creator>
      <dc:date>2026-06-26T06:30:58Z</dc:date>
    </item>
    <item>
      <title>Re: Why is this so hard -- Simple log parsing</title>
      <link>https://community.dynatrace.com/t5/DQL/Why-is-this-so-hard-Simple-log-parsing/m-p/301231#M3399</link>
      <description>&lt;P&gt;Update...&lt;/P&gt;&lt;P&gt;This works&lt;/P&gt;&lt;P&gt;fetch logs&lt;BR /&gt;| parse content, """LD 'duser=' LD:test 'shost='"""&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Next question, if I wanted to parse out part of the path returned, how do I escape the '\'&lt;/P&gt;&lt;P&gt;The following doesn't work&lt;/P&gt;&lt;P&gt;fetch logs&lt;BR /&gt;| parse content, """LD 'duser=c:\\&lt;U&gt;cycfgvol1\\&lt;/U&gt;' LD:test 'shost='"""&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jun 2026 21:35:46 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Why-is-this-so-hard-Simple-log-parsing/m-p/301231#M3399</guid>
      <dc:creator>jim_hinze</dc:creator>
      <dc:date>2026-06-25T21:35:46Z</dc:date>
    </item>
    <item>
      <title>Re: Why is this so hard -- Simple log parsing</title>
      <link>https://community.dynatrace.com/t5/DQL/Why-is-this-so-hard-Simple-log-parsing/m-p/301232#M3400</link>
      <description>&lt;P&gt;Use DPL architect (click on extract fields).&lt;BR /&gt;Probably you want something this (use any line data for duser value, extract into duser field until shost= is found:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| parse content, """LD 'duser=' LD:duser ' shost='"""&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jun 2026 21:39:37 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Why-is-this-so-hard-Simple-log-parsing/m-p/301232#M3400</guid>
      <dc:creator>Julius_Loman</dc:creator>
      <dc:date>2026-06-25T21:39:37Z</dc:date>
    </item>
    <item>
      <title>Re: Why is this so hard -- Simple log parsing</title>
      <link>https://community.dynatrace.com/t5/DQL/Why-is-this-so-hard-Simple-log-parsing/m-p/301240#M3401</link>
      <description>&lt;P&gt;Maybe you can try with this approach, extracting the fields with DPL, then parse the path with DQL&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| parse content, """LD '|Windows File' LD:PureCommand '|' LD "duser=" LD:path "shost=""""
| fieldsAdd pathArray=splitString(path, "\\")
| fieldsAdd pathElement2=pathArray[2], fileName=arrayLast(pathArray)&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 26 Jun 2026 06:14:32 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Why-is-this-so-hard-Simple-log-parsing/m-p/301240#M3401</guid>
      <dc:creator>GerardJ</dc:creator>
      <dc:date>2026-06-26T06:14:32Z</dc:date>
    </item>
  </channel>
</rss>

