<?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: Separating different log entries from a single source in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-separate-different-log-entries-from-a-single-source/m-p/588427#M103281</link>
    <description>&lt;P&gt;Thank you so much,&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;!&lt;/P&gt;</description>
    <pubDate>Thu, 10 Mar 2022 14:09:48 GMT</pubDate>
    <dc:creator>rubenmuradyan</dc:creator>
    <dc:date>2022-03-10T14:09:48Z</dc:date>
    <item>
      <title>How to separate different log entries from a single source?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-separate-different-log-entries-from-a-single-source/m-p/588365#M103275</link>
      <description>&lt;P&gt;I'm getting logs from a dockerized in-house developed application and ingesting them into Splunk.&lt;/P&gt;
&lt;P&gt;There are 3 types of logs, coming into the log file:&lt;/P&gt;
&lt;P&gt;1. Application logs (single line, internal format)&lt;/P&gt;
&lt;P&gt;2. UWSGI logs (multiline)&lt;/P&gt;
&lt;P&gt;3. ModSecurity serial logging (multiline)&lt;/P&gt;
&lt;P&gt;The logs are forwarded to remote syslog server, and then ingested into Splunk with universal forwarder. While those logs are in different formats I want to separate them into different indexes for different processing approaches.&lt;/P&gt;
&lt;P&gt;Is there any good documentation piece/forum post/tutorial/anything that describes effective way to separate different log types from a mixed source?&lt;BR /&gt;&lt;BR /&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2022 15:50:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-separate-different-log-entries-from-a-single-source/m-p/588365#M103275</guid>
      <dc:creator>rubenmuradyan</dc:creator>
      <dc:date>2022-03-10T15:50:05Z</dc:date>
    </item>
    <item>
      <title>Re: Separating different log entries from a single source</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-separate-different-log-entries-from-a-single-source/m-p/588371#M103276</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/241119"&gt;@rubenmuradyan&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;you don't need to put logs in different indexes, usually alog is recorded in a different index whan there's a different retention or access grants.&lt;/P&gt;&lt;P&gt;Instead, you have to associate a diferent sourcetype to each kind of logs because they have a different format and because sourcetype is the real differentiator between logs (non index), remember that Splunk isn't a DB where the difference is the table.&lt;/P&gt;&lt;P&gt;Anyway, the correct approach is to override sourcetype on Indexers or (if present) on Heavy Forwarders, following the instructions at&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/8.2.5/Data/Advancedsourcetypeoverrides" target="_blank" rel="noopener"&gt;https://docs.splunk.com/Documentation/Splunk/8.2.5/Data/Advancedsourcetypeoverrides&lt;/A&gt;&lt;/P&gt;&lt;P&gt;in few words, you have to find a regex to identify each kind of log and then create for each destination sourcetype a stanza in:&lt;/P&gt;&lt;P&gt;props.conf&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[origin_sourcetype]
TRANSFORMS-sourcetype = override_sourcetype1, override_sourcetype2, override_sourcetype3&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and in transforms.conf&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[override_sourcetype1]
REGEX = sourcetype1_regex
FORMAT = sourcetype::sourcetype1
DEST_KEY = MetaData:Sourcetype

[override_sourcetype2]
REGEX = sourcetype2_regex
FORMAT = sourcetype::sourcetype2
DEST_KEY = MetaData:Sourcetype

[override_sourcetype3]
REGEX = sourcetype3_regex
FORMAT = sourcetype::sourcetype3
DEST_KEY = MetaData:Sourcetype&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Rememeber that these conf files must be on Indexers or, when present, on Heavy Forwarders.&lt;/P&gt;&lt;P&gt;Then remember to reboot Splunk on the modified server.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2022 09:43:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-separate-different-log-entries-from-a-single-source/m-p/588371#M103276</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-03-10T09:43:16Z</dc:date>
    </item>
    <item>
      <title>Re: Separating different log entries from a single source</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-separate-different-log-entries-from-a-single-source/m-p/588401#M103279</link>
      <description>&lt;P&gt;Thank you so much&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;, that really helped.&lt;/P&gt;&lt;P&gt;Perhaps you know (or know the correct documentation piece) how to make a difference between single line entries and multiline ones, coming in the same logfile?&lt;/P&gt;&lt;P&gt;I'm not sure if it is a good idea to combine two types of regexs (single line and multiline) for one log. Additionally the default Splunk approach - to set the start of multiline event with timestamp will obviously not work with modsecurity entries: they do not have prepending timestamps for entries, at leat for the serial audit logging.&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2022 12:52:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-separate-different-log-entries-from-a-single-source/m-p/588401#M103279</guid>
      <dc:creator>rubenmuradyan</dc:creator>
      <dc:date>2022-03-10T12:52:40Z</dc:date>
    </item>
    <item>
      <title>Re: Separating different log entries from a single source</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-separate-different-log-entries-from-a-single-source/m-p/588404#M103280</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/241119"&gt;@rubenmuradyan&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;you have to use a multiline sourcetype (using SHOULD_LINEMERGE=True) for the original sourcetype, so you can manage both the situations, then in the sourcetype overriding you can set the correct sourcetype.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2022 12:56:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-separate-different-log-entries-from-a-single-source/m-p/588404#M103280</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-03-10T12:56:24Z</dc:date>
    </item>
    <item>
      <title>Re: Separating different log entries from a single source</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-separate-different-log-entries-from-a-single-source/m-p/588427#M103281</link>
      <description>&lt;P&gt;Thank you so much,&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;!&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2022 14:09:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-separate-different-log-entries-from-a-single-source/m-p/588427#M103281</guid>
      <dc:creator>rubenmuradyan</dc:creator>
      <dc:date>2022-03-10T14:09:48Z</dc:date>
    </item>
  </channel>
</rss>

