<?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 Ingesting logs from script: best practices? in Open Q&amp;A</title>
    <link>https://community.dynatrace.com/t5/Open-Q-A/Ingesting-logs-from-script-best-practices/m-p/217295#M27377</link>
    <description>&lt;P&gt;I have several cases where I need to ingest logs into Dynatrace from scripts that I control, in servers where OneAgent is running.&lt;/P&gt;&lt;P&gt;Now, I try to ingest them directly through the OneAgent log ingest API: &lt;A href="https://www.dynatrace.com/support/help/extend-dynatrace/extend-logs/oneagent-log-ingest-api" target="_blank"&gt;https://www.dynatrace.com/support/help/extend-dynatrace/extend-logs/oneagent-log-ingest-api&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I do this for several reasons:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Don't need to write them to file, where OneAgent could get them also. Don't use disk space.&lt;/LI&gt;&lt;LI&gt;I believe it's faster, but have not really measured it.&lt;/LI&gt;&lt;LI&gt;I can add meta-data to the logs ingested in a more controlled way.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I sometimes have doubts if there are disadvantages in this approach. For instance, it's way easier to dump into a file, and you don't have to code so much. You also have to be careful not committing errors. Are there other point of views, or how are you doing it yourself?&lt;/P&gt;</description>
    <pubDate>Fri, 07 Jul 2023 18:17:18 GMT</pubDate>
    <dc:creator>AntonioSousa</dc:creator>
    <dc:date>2023-07-07T18:17:18Z</dc:date>
    <item>
      <title>Ingesting logs from script: best practices?</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Ingesting-logs-from-script-best-practices/m-p/217295#M27377</link>
      <description>&lt;P&gt;I have several cases where I need to ingest logs into Dynatrace from scripts that I control, in servers where OneAgent is running.&lt;/P&gt;&lt;P&gt;Now, I try to ingest them directly through the OneAgent log ingest API: &lt;A href="https://www.dynatrace.com/support/help/extend-dynatrace/extend-logs/oneagent-log-ingest-api" target="_blank"&gt;https://www.dynatrace.com/support/help/extend-dynatrace/extend-logs/oneagent-log-ingest-api&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I do this for several reasons:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Don't need to write them to file, where OneAgent could get them also. Don't use disk space.&lt;/LI&gt;&lt;LI&gt;I believe it's faster, but have not really measured it.&lt;/LI&gt;&lt;LI&gt;I can add meta-data to the logs ingested in a more controlled way.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I sometimes have doubts if there are disadvantages in this approach. For instance, it's way easier to dump into a file, and you don't have to code so much. You also have to be careful not committing errors. Are there other point of views, or how are you doing it yourself?&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jul 2023 18:17:18 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Ingesting-logs-from-script-best-practices/m-p/217295#M27377</guid>
      <dc:creator>AntonioSousa</dc:creator>
      <dc:date>2023-07-07T18:17:18Z</dc:date>
    </item>
    <item>
      <title>Re: Ingesting logs from script: best practices?</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Ingesting-logs-from-script-best-practices/m-p/217315#M27384</link>
      <description>&lt;P&gt;Hi Antonio:)&lt;/P&gt;&lt;P&gt;A mechanism that directly reads data from logs and sends relevant fragments to DT in the form of metrics works best. You can make a script that checks if an error has occurred, for example, and then sends the entire line of the entry related to this error to DT after the API.&lt;/P&gt;&lt;P&gt;Writing to files as you write has many disadvantages. You have to keep an eye on file compatibility, define appropriate data overwrite cycles, you use valuable resources, etc.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Radek&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jul 2023 06:14:46 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Ingesting-logs-from-script-best-practices/m-p/217315#M27384</guid>
      <dc:creator>radek_jasinski</dc:creator>
      <dc:date>2023-07-10T06:14:46Z</dc:date>
    </item>
  </channel>
</rss>

