<?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 Parsing logs from Python Docker container sent to Splunk HEC in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/Parsing-logs-from-Python-Docker-container-sent-to-Splunk-HEC/m-p/429318#M7674</link>
    <description>&lt;P&gt;I'm sending all my docker containers logs to my local Splunk server.&lt;/P&gt;

&lt;P&gt;One of these containers is running a Python server (using Flask/nginx).&lt;/P&gt;

&lt;P&gt;For debugging and log file reasons, my Python logs are foramtted with a standard line: &lt;CODE&gt;%(asctime)s - %(name)s - %(levelname)s - %(message)s&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;I can see the log line clearly in Splunk, however, I would also want to parse the timestamp, log-level etc. In addition, it seems that stack traces are split to multiple messages.&lt;/P&gt;

&lt;P&gt;&lt;IMG src="https://i.stack.imgur.com/RKsdD.png" alt="screenshot" /&gt;&lt;/P&gt;

&lt;P&gt;Note that not all messages from the host sent to this server are from Python, but the other ones don't require additional formatting.&lt;/P&gt;

&lt;P&gt;So:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;&lt;P&gt;How can I configure Splunk to parse my messages according to my log format?&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;How can I merge the stack trace logs to a single message (I'm guessing that it should be done on consuming)&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;Can I define formatting for the Python messages without damaging the 'other' messages?&lt;/P&gt;&lt;/LI&gt;
&lt;/UL&gt;</description>
    <pubDate>Thu, 18 Oct 2018 15:54:41 GMT</pubDate>
    <dc:creator>reallyliri</dc:creator>
    <dc:date>2018-10-18T15:54:41Z</dc:date>
    <item>
      <title>Parsing logs from Python Docker container sent to Splunk HEC</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Parsing-logs-from-Python-Docker-container-sent-to-Splunk-HEC/m-p/429318#M7674</link>
      <description>&lt;P&gt;I'm sending all my docker containers logs to my local Splunk server.&lt;/P&gt;

&lt;P&gt;One of these containers is running a Python server (using Flask/nginx).&lt;/P&gt;

&lt;P&gt;For debugging and log file reasons, my Python logs are foramtted with a standard line: &lt;CODE&gt;%(asctime)s - %(name)s - %(levelname)s - %(message)s&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;I can see the log line clearly in Splunk, however, I would also want to parse the timestamp, log-level etc. In addition, it seems that stack traces are split to multiple messages.&lt;/P&gt;

&lt;P&gt;&lt;IMG src="https://i.stack.imgur.com/RKsdD.png" alt="screenshot" /&gt;&lt;/P&gt;

&lt;P&gt;Note that not all messages from the host sent to this server are from Python, but the other ones don't require additional formatting.&lt;/P&gt;

&lt;P&gt;So:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;&lt;P&gt;How can I configure Splunk to parse my messages according to my log format?&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;How can I merge the stack trace logs to a single message (I'm guessing that it should be done on consuming)&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;Can I define formatting for the Python messages without damaging the 'other' messages?&lt;/P&gt;&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Thu, 18 Oct 2018 15:54:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Parsing-logs-from-Python-Docker-container-sent-to-Splunk-HEC/m-p/429318#M7674</guid>
      <dc:creator>reallyliri</dc:creator>
      <dc:date>2018-10-18T15:54:41Z</dc:date>
    </item>
  </channel>
</rss>

