<?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 Re: Why is wildcard required in DQL matchesPhrase with host.name? in DQL</title>
    <link>https://community.dynatrace.com/t5/DQL/Why-is-wildcard-required-in-DQL-matchesPhrase-with-host-name/m-p/237300#M651</link>
    <description>&lt;P&gt;Please let someone from Dynatrace respond thanks.&lt;/P&gt;</description>
    <pubDate>Thu, 15 Feb 2024 20:13:12 GMT</pubDate>
    <dc:creator>GerryIsHere</dc:creator>
    <dc:date>2024-02-15T20:13:12Z</dc:date>
    <item>
      <title>Why is wildcard required in DQL matchesPhrase with host.name?</title>
      <link>https://community.dynatrace.com/t5/DQL/Why-is-wildcard-required-in-DQL-matchesPhrase-with-host-name/m-p/237291#M647</link>
      <description>&lt;P&gt;&lt;STRONG&gt;This fails:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;fetch logs&lt;BR /&gt;| filter matchesPhrase(host.name, "carn") // fail&lt;BR /&gt;and matchesPhrase(log.source, "rmwfeapi")&lt;BR /&gt;and matchesPhrase(content, "Unable")&lt;BR /&gt;| fieldsKeep timestamp, host.name, content, log.source&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;This works:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;fetch logs&lt;BR /&gt;| filter matchesPhrase(host.name, "carn*") // why is wildcard required?&lt;BR /&gt;and matchesPhrase(log.source, "rmwfeapi")&lt;BR /&gt;and matchesPhrase(content, "Unable") // this works!&lt;BR /&gt;| fieldsKeep timestamp, host.name, content, log.source&lt;/P&gt;&lt;P&gt;What is it about host.name that matchesPhrase doesn't work as expected? It can find "Unable" in the&amp;nbsp; middle of content but it can't find "carn" at the beginning of host.name? Why not?&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2024 19:34:13 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Why-is-wildcard-required-in-DQL-matchesPhrase-with-host-name/m-p/237291#M647</guid>
      <dc:creator>GerryIsHere</dc:creator>
      <dc:date>2024-02-15T19:34:13Z</dc:date>
    </item>
    <item>
      <title>Re: Why is wildcard required in DQL matchesPhrase with host.name?</title>
      <link>https://community.dynatrace.com/t5/DQL/Why-is-wildcard-required-in-DQL-matchesPhrase-with-host-name/m-p/237293#M648</link>
      <description>&lt;P&gt;MatchPhrase should match the exact value you are querying.&lt;/P&gt;&lt;P&gt;So I am assuming your host name is not only carn, but carn'something'.&lt;/P&gt;&lt;P&gt;Can you confirm?&lt;/P&gt;&lt;P&gt;If you want to filter by hostname with just a piece of the name without using the wildcard, you can use the contains instead.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2024 19:40:17 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Why-is-wildcard-required-in-DQL-matchesPhrase-with-host-name/m-p/237293#M648</guid>
      <dc:creator>dannemca</dc:creator>
      <dc:date>2024-02-15T19:40:17Z</dc:date>
    </item>
    <item>
      <title>Re: Why is wildcard required in DQL matchesPhrase with host.name?</title>
      <link>https://community.dynatrace.com/t5/DQL/Why-is-wildcard-required-in-DQL-matchesPhrase-with-host-name/m-p/237294#M649</link>
      <description>&lt;P&gt;My message says "carn*" works and "carn" does not. If "carn" was the server name "carn" would work. I think this is a DQL bug.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2024 19:52:23 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Why-is-wildcard-required-in-DQL-matchesPhrase-with-host-name/m-p/237294#M649</guid>
      <dc:creator>GerryIsHere</dc:creator>
      <dc:date>2024-02-15T19:52:23Z</dc:date>
    </item>
    <item>
      <title>Re: Why is wildcard required in DQL matchesPhrase with host.name?</title>
      <link>https://community.dynatrace.com/t5/DQL/Why-is-wildcard-required-in-DQL-matchesPhrase-with-host-name/m-p/237297#M650</link>
      <description>&lt;P&gt;That's not a bug, that's just how matchPhrase works:&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.dynatrace.com/docs/observe-and-explore/logs/lma-log-processing-matcher#lp-dql-matchesPhrase" target="_blank"&gt;https://docs.dynatrace.com/docs/observe-and-explore/logs/lma-log-processing-matcher#lp-dql-matchesPhrase&lt;/A&gt;&lt;/P&gt;&lt;P&gt;It should match the phrase you are looking for. If you want to get a string piece only, you should use "contains" instead.&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.dynatrace.com/docs/platform/grail/dynatrace-query-language/functions/string-functions#contains" target="_blank"&gt;https://docs.dynatrace.com/docs/platform/grail/dynatrace-query-language/functions/string-functions#contains&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2024 19:55:43 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Why-is-wildcard-required-in-DQL-matchesPhrase-with-host-name/m-p/237297#M650</guid>
      <dc:creator>dannemca</dc:creator>
      <dc:date>2024-02-15T19:55:43Z</dc:date>
    </item>
    <item>
      <title>Re: Why is wildcard required in DQL matchesPhrase with host.name?</title>
      <link>https://community.dynatrace.com/t5/DQL/Why-is-wildcard-required-in-DQL-matchesPhrase-with-host-name/m-p/237300#M651</link>
      <description>&lt;P&gt;Please let someone from Dynatrace respond thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2024 20:13:12 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Why-is-wildcard-required-in-DQL-matchesPhrase-with-host-name/m-p/237300#M651</guid>
      <dc:creator>GerryIsHere</dc:creator>
      <dc:date>2024-02-15T20:13:12Z</dc:date>
    </item>
    <item>
      <title>Re: Why is wildcard required in DQL matchesPhrase with host.name?</title>
      <link>https://community.dynatrace.com/t5/DQL/Why-is-wildcard-required-in-DQL-matchesPhrase-with-host-name/m-p/237303#M652</link>
      <description>&lt;P&gt;because word boundaries count&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2024 22:01:21 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Why-is-wildcard-required-in-DQL-matchesPhrase-with-host-name/m-p/237303#M652</guid>
      <dc:creator>GerryIsHere</dc:creator>
      <dc:date>2024-02-15T22:01:21Z</dc:date>
    </item>
  </channel>
</rss>

