<?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 Custom Log ingestion Dynatrace in DQL</title>
    <link>https://community.dynatrace.com/t5/DQL/Custom-Log-ingestion-Dynatrace/m-p/248467#M990</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;My team and I have successfully processed a custom JSON and sent it to Dynatrace using the log ingestion POST API. We need this data for offline monitoring of an application.&lt;/P&gt;
&lt;P&gt;We are now starting to use GRAIL to create dashboards. However, we've encountered a problem: when the data is input into log monitoring, even the numbers in the JSON are recognized as strings.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Captured POST ingestion only string detection" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/20583i95C734EF30A320F3/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2024-06-17 163533.png" alt="Captured POST ingestion only string detection" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Captured POST ingestion only string detection&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;This is the passed json example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{
        "userAgent": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        "language": "it-IT",
        "cookieEnabled": true,
        "name": "xxxxxxx",
        "timestamp": 1718614669096,
        "session": "1718614523449",
        "userName": "xxxxxx",
        "online": false,
        "deviceMemory": 8,
        "hardwareConcurrency": 8,
        "connectionDownlink": 0,
        "connectionType": "4g",
        "connectionRoundTripTime": 0,
        "duration": 1017
    }&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;To address this problem, we could either:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Modify the data during processing by using built-in Dynatrace functions like `toLong(...)` or `toDuration(...)`.&lt;/LI&gt;
&lt;LI&gt;Or parse it using DPL with the parse syntax `JSON:ingest`. And do not seems also to work correctly as we expected (only recognise duration).&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="parsing using parse commad for json" style="width: 823px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/20584iBAC708713D0459A6/image-dimensions/823x151?v=v2" width="823" height="151" role="button" title="Screenshot 2024-06-17 164410.png" alt="parsing using parse commad for json" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;parsing using parse commad for json&lt;/span&gt;&lt;/span&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;Our question concerns performance. Each time we use these commands to change the field type or parse our JSON with DPL, it impacts performance. Is there a way to have our JSON data directly arrive with the correct field types, so we don't have to modify them later and just use them?&lt;/P&gt;
&lt;P&gt;Thank you for your help.&lt;/P&gt;
&lt;P&gt;Piermarco&lt;/P&gt;</description>
    <pubDate>Tue, 18 Jun 2024 06:49:34 GMT</pubDate>
    <dc:creator>Piermarco</dc:creator>
    <dc:date>2024-06-18T06:49:34Z</dc:date>
    <item>
      <title>Custom Log ingestion Dynatrace</title>
      <link>https://community.dynatrace.com/t5/DQL/Custom-Log-ingestion-Dynatrace/m-p/248467#M990</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;My team and I have successfully processed a custom JSON and sent it to Dynatrace using the log ingestion POST API. We need this data for offline monitoring of an application.&lt;/P&gt;
&lt;P&gt;We are now starting to use GRAIL to create dashboards. However, we've encountered a problem: when the data is input into log monitoring, even the numbers in the JSON are recognized as strings.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Captured POST ingestion only string detection" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/20583i95C734EF30A320F3/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2024-06-17 163533.png" alt="Captured POST ingestion only string detection" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Captured POST ingestion only string detection&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;This is the passed json example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{
        "userAgent": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        "language": "it-IT",
        "cookieEnabled": true,
        "name": "xxxxxxx",
        "timestamp": 1718614669096,
        "session": "1718614523449",
        "userName": "xxxxxx",
        "online": false,
        "deviceMemory": 8,
        "hardwareConcurrency": 8,
        "connectionDownlink": 0,
        "connectionType": "4g",
        "connectionRoundTripTime": 0,
        "duration": 1017
    }&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;To address this problem, we could either:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Modify the data during processing by using built-in Dynatrace functions like `toLong(...)` or `toDuration(...)`.&lt;/LI&gt;
&lt;LI&gt;Or parse it using DPL with the parse syntax `JSON:ingest`. And do not seems also to work correctly as we expected (only recognise duration).&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="parsing using parse commad for json" style="width: 823px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/20584iBAC708713D0459A6/image-dimensions/823x151?v=v2" width="823" height="151" role="button" title="Screenshot 2024-06-17 164410.png" alt="parsing using parse commad for json" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;parsing using parse commad for json&lt;/span&gt;&lt;/span&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;Our question concerns performance. Each time we use these commands to change the field type or parse our JSON with DPL, it impacts performance. Is there a way to have our JSON data directly arrive with the correct field types, so we don't have to modify them later and just use them?&lt;/P&gt;
&lt;P&gt;Thank you for your help.&lt;/P&gt;
&lt;P&gt;Piermarco&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jun 2024 06:49:34 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Custom-Log-ingestion-Dynatrace/m-p/248467#M990</guid>
      <dc:creator>Piermarco</dc:creator>
      <dc:date>2024-06-18T06:49:34Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Log ingestion Dynatrace</title>
      <link>https://community.dynatrace.com/t5/DQL/Custom-Log-ingestion-Dynatrace/m-p/248506#M991</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;My recommendation is to create a log processing rule. There is no better way to ensure that the data is captured in the form you want.&amp;nbsp;&lt;/P&gt;&lt;P&gt;This way, the data inside Dynatrace is already the correct one, so you don't need to make changes later.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps. Wish you good monitoring!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jun 2024 07:50:06 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Custom-Log-ingestion-Dynatrace/m-p/248506#M991</guid>
      <dc:creator>jaume_reverte</dc:creator>
      <dc:date>2024-06-18T07:50:06Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Log ingestion Dynatrace</title>
      <link>https://community.dynatrace.com/t5/DQL/Custom-Log-ingestion-Dynatrace/m-p/248519#M992</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Where I can find it ?&lt;BR /&gt;&lt;BR /&gt;Thanks for the replay.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jun 2024 08:18:20 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Custom-Log-ingestion-Dynatrace/m-p/248519#M992</guid>
      <dc:creator>Piermarco</dc:creator>
      <dc:date>2024-06-18T08:18:20Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Log ingestion Dynatrace</title>
      <link>https://community.dynatrace.com/t5/DQL/Custom-Log-ingestion-Dynatrace/m-p/248522#M993</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.dynatrace.com/docs/shortlink/lma-log-processing-examples#lpexample3" target="_blank" rel="noopener"&gt;Here&lt;/A&gt; is an example of what you want to perform and the &lt;A href="https://docs.dynatrace.com/docs/observe-and-explore/logs/lma-log-processing#log-processing" target="_blank" rel="noopener"&gt;documentation&lt;/A&gt; page.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jun 2024 08:23:58 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Custom-Log-ingestion-Dynatrace/m-p/248522#M993</guid>
      <dc:creator>jaume_reverte</dc:creator>
      <dc:date>2024-06-18T08:23:58Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Log ingestion Dynatrace</title>
      <link>https://community.dynatrace.com/t5/DQL/Custom-Log-ingestion-Dynatrace/m-p/248568#M996</link>
      <description>&lt;P data-unlink="true"&gt;Hi,&amp;nbsp;&lt;BR /&gt;As you suggested to me I have create a custom rule to capture the logs in&amp;nbsp;&lt;SPAN class=""&gt;Settings&lt;/SPAN&gt;&amp;nbsp;&amp;gt;&amp;nbsp;&lt;SPAN class=""&gt;Log Monitoring&lt;/SPAN&gt;&amp;nbsp;&amp;gt; Processing.&lt;BR /&gt;This is the fetch log:&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="fetch log" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/20608i29A382F8CD85C68D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2024-06-18 151118.png" alt="fetch log" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;fetch log&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;So I have created a new processig rule:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;I have use the same matcher in the log ingester&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;matchesValue(TagDynatarce, "Offline_log_ingestion")​&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;2. And use this rule to pass my parameter with the correct type as I want:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;USING(
    IN userAgent: STRING?,
    IN language: STRING?, 
    IN cookieEnabled: BOOLEAN?,
    INOUT timestampX: TIMESTAMP,
    IN session: STRING,
    IN online: BOOLEAN?,
    IN deviceMemory: INTEGER?,
    IN hardwareConcurrency: INTEGER?,
    IN connectionDownlink: INTEGER?,
    IN connectionType: STRING,
    IN connectionRoundTripTime: INTEGER?,
    INOUT durations: INTEGER,
    INOUT name:STRING,
    INOUT userName:STRING, 
    INOUT TagDynatarce:STRING
)
| FIELDS_RENAME(
    duration: durations,
    actionName: name,
    timestamp: timestampX
)
| FIELDS_REMOVE(durations, name, timestampX, TagDynatarce)​&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. After I test it and it is able to find and change the content.&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Test the rule" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/20609iD36409C7D2B7251D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2024-06-18 152209.png" alt="Test the rule" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Test the rule&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now what I expect after I have defined this rule that in GRAL the json is correctly ingest and with the correct type of field, but it does not work.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GRAIL" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/20610i0269FE2405E1CD34/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2024-06-18 152506.png" alt="GRAIL" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;GRAIL&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Am I doing something wrong ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the time&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jun 2024 13:33:00 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Custom-Log-ingestion-Dynatrace/m-p/248568#M996</guid>
      <dc:creator>Piermarco</dc:creator>
      <dc:date>2024-06-18T13:33:00Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Log ingestion Dynatrace</title>
      <link>https://community.dynatrace.com/t5/DQL/Custom-Log-ingestion-Dynatrace/m-p/248628#M997</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't see any error.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I see in the last photo that you have one new entry with the correct values. This rule only applies to new ingested logs, not to old logs.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jun 2024 06:18:58 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Custom-Log-ingestion-Dynatrace/m-p/248628#M997</guid>
      <dc:creator>jaume_reverte</dc:creator>
      <dc:date>2024-06-19T06:18:58Z</dc:date>
    </item>
  </channel>
</rss>

