<?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 Log Processing &amp;quot;CASE&amp;quot; ? in Open Q&amp;A</title>
    <link>https://community.dynatrace.com/t5/Open-Q-A/Log-Processing-quot-CASE-quot/m-p/242120#M31765</link>
    <description>&lt;P&gt;When processing a log I have, I need to give an attribute a value based on a single character in the log entries. Basically, I need to do the following translations:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;'N' -&amp;gt; North&lt;/LI&gt;&lt;LI&gt;'S' -&amp;gt; South&lt;/LI&gt;&lt;LI&gt;'E' -&amp;gt; East&lt;/LI&gt;&lt;LI&gt;'W' -&amp;gt; West&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;What would be the best and efficient way to do it?&lt;/P&gt;</description>
    <pubDate>Mon, 08 Apr 2024 19:44:02 GMT</pubDate>
    <dc:creator>AntonioSousa</dc:creator>
    <dc:date>2024-04-08T19:44:02Z</dc:date>
    <item>
      <title>Log Processing "CASE" ?</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Log-Processing-quot-CASE-quot/m-p/242120#M31765</link>
      <description>&lt;P&gt;When processing a log I have, I need to give an attribute a value based on a single character in the log entries. Basically, I need to do the following translations:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;'N' -&amp;gt; North&lt;/LI&gt;&lt;LI&gt;'S' -&amp;gt; South&lt;/LI&gt;&lt;LI&gt;'E' -&amp;gt; East&lt;/LI&gt;&lt;LI&gt;'W' -&amp;gt; West&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;What would be the best and efficient way to do it?&lt;/P&gt;</description>
      <pubDate>Mon, 08 Apr 2024 19:44:02 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Log-Processing-quot-CASE-quot/m-p/242120#M31765</guid>
      <dc:creator>AntonioSousa</dc:creator>
      <dc:date>2024-04-08T19:44:02Z</dc:date>
    </item>
    <item>
      <title>Re: Log Processing "CASE" ?</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Log-Processing-quot-CASE-quot/m-p/243369#M31952</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I assume it's Log monitoring classic.&lt;/P&gt;&lt;P&gt;The content of the log for example: "2024.04.20 quarter: N"&lt;/P&gt;&lt;P&gt;First, define "my.quarter" attr. :&lt;/P&gt;&lt;P&gt;USING(INOUT, my.quarter:STRING, content)&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then Parse my.quarter from content:&lt;/P&gt;&lt;P&gt;| PARSE(content,"LD 'quarter:' SPACE? STRING:my.quarter")&lt;/P&gt;&lt;P&gt;Then put transformed value to my.renamed_quarter if Letter matches:&lt;/P&gt;&lt;P&gt;| FIELDS_ADD(my.renamed_quarter: IF_THEN(my.quarter == 'N', 'NORTH',))&lt;/P&gt;&lt;P&gt;|&amp;nbsp;FIELDS_ADD(my.renamed_quarter: IF_THEN(my.quarter == 'S', 'SOUTH',))&lt;/P&gt;&lt;P&gt;|&amp;nbsp;FIELDS_ADD(my.renamed_quarter: IF_THEN(my.quarter == 'E', 'EAST',))&lt;/P&gt;&lt;P&gt;|&amp;nbsp;FIELDS_ADD(my.renamed_quarter: IF_THEN(my.quarter == 'W', 'WEST',))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The result looks like this:&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;"content": "2024.04.20 quarter: N"&lt;BR /&gt;"timestamp": "1656011338522",&lt;BR /&gt;"my.quarter": "N",&lt;/P&gt;&lt;P&gt;"my.renamed_quarter": "NORTH"&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used this example:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.dynatrace.com/docs/shortlink/log-monitoring-log-processing-examples#lpexample8" target="_blank"&gt;https://docs.dynatrace.com/docs/shortlink/log-monitoring-log-processing-examples#lpexample8&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Attila&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 20 Apr 2024 19:57:39 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Log-Processing-quot-CASE-quot/m-p/243369#M31952</guid>
      <dc:creator>sattilas</dc:creator>
      <dc:date>2024-04-20T19:57:39Z</dc:date>
    </item>
  </channel>
</rss>

