<?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: How to split a log into multiple sourcetypes on a heavy forwarder? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-split-a-log-into-multiple-sourcetypes-on-a-heavy/m-p/173636#M34941</link>
    <description>&lt;P&gt;Try this (put it on Heavy forwarder and restart)&lt;/P&gt;

&lt;P&gt;inputs.conf (same as before)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:///splunk/F5]
disabled = false
sourcetype = f5
index = f5
blacklist = gz
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[f5]
TIME_PREFIX = ^
TIME_FORMAT= %Y-%m-%dTO%H:%M:%S%:z
TRANSFORMS-changeSourcetype1 = psm-set-sourcetype, asm-set-sourcetype

[psm_log]
[asm_log]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[asm-set-sourcetype]
DEST_KEY = MetaData:Sourcetype
REGEX = (\sASM:\s)
FORMAT = asm_log

[psm-set-sourcetype]
DEST_KEY = MetaData:Sourcetype
REGEX = (\sPSM:\s)
FORMAT = psm_log
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 10 Mar 2015 16:36:16 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2015-03-10T16:36:16Z</dc:date>
    <item>
      <title>How to split a log into multiple sourcetypes on a heavy forwarder?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-split-a-log-into-multiple-sourcetypes-on-a-heavy/m-p/173635#M34940</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
I seem to be struggling in splitting log data from the heavy forwarder into several sourcetypes in an index.&lt;/P&gt;

&lt;P&gt;I have a network device sending logdata to the heavyforwarder via syslog which dumps it into a flat file.&lt;BR /&gt;
The heavyforwarder reads the files and sends to the indexers.. All good so far.&lt;BR /&gt;
Now what I'm trying to do is have 2 regexes split into 2 sourcetypes and everything else into the default sourcetype for that index.&lt;/P&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    [asm_log]
    TIME_PREFIX = ^
    TIME_FORMAT= %Y-%m-%dTO%H:%M:%S%:z
    TRANSFORMS-changeSourcetype1 = routeAsmlog, asm-set-sourcetype

    [psm_log]
    TIME_PREFIX = ^
    TIME_FORMAT= %Y-%m-%dTO%H:%M:%S%:z
    TRANSFORMS-changeSourcetype2 = routePsmlog, psm-set-sourcetype
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    [routeAsmlog]
    REGEX = (\sASM:\s)
    DEST_KEY = queue
    FORMAT = indexQueue

    [asm-set-sourcetype]
    DEST_KEY = MetaData:Sourcetype
    REGEX = (\sASM:\s)
    FORMAT = asm_log

also tried FORMAT = sourcetype::f5:asm

    [routePsmlog]
    REGEX = (\sPSM:\s)
    DEST_KEY = queue
    FORMAT = indexQueue

    [psm-set-sourcetype]
    DEST_KEY = MetaData:Sourcetype
    REGEX = (\sPSM:\s)
    FORMAT = psm_log
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;inputs.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    [monitor:///splunk/F5]
    disabled = false
    sourcetype = f5
    index = f5
    blacklist = gz

also tried removing the sourcetype line
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Any idea where I'm going wrong?&lt;/P&gt;

&lt;P&gt;Thanks in advance&lt;BR /&gt;
Steve&lt;/P&gt;</description>
      <pubDate>Tue, 10 Mar 2015 15:24:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-split-a-log-into-multiple-sourcetypes-on-a-heavy/m-p/173635#M34940</guid>
      <dc:creator>cdstealer</dc:creator>
      <dc:date>2015-03-10T15:24:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to split a log into multiple sourcetypes on a heavy forwarder?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-split-a-log-into-multiple-sourcetypes-on-a-heavy/m-p/173636#M34941</link>
      <description>&lt;P&gt;Try this (put it on Heavy forwarder and restart)&lt;/P&gt;

&lt;P&gt;inputs.conf (same as before)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:///splunk/F5]
disabled = false
sourcetype = f5
index = f5
blacklist = gz
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[f5]
TIME_PREFIX = ^
TIME_FORMAT= %Y-%m-%dTO%H:%M:%S%:z
TRANSFORMS-changeSourcetype1 = psm-set-sourcetype, asm-set-sourcetype

[psm_log]
[asm_log]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[asm-set-sourcetype]
DEST_KEY = MetaData:Sourcetype
REGEX = (\sASM:\s)
FORMAT = asm_log

[psm-set-sourcetype]
DEST_KEY = MetaData:Sourcetype
REGEX = (\sPSM:\s)
FORMAT = psm_log
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 10 Mar 2015 16:36:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-split-a-log-into-multiple-sourcetypes-on-a-heavy/m-p/173636#M34941</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2015-03-10T16:36:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to split a log into multiple sourcetypes on a heavy forwarder?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-split-a-log-into-multiple-sourcetypes-on-a-heavy/m-p/173637#M34942</link>
      <description>&lt;P&gt;Thank you yet again for saving my frail sanity &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;  Worked like a charm!&lt;/P&gt;</description>
      <pubDate>Tue, 10 Mar 2015 17:14:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-split-a-log-into-multiple-sourcetypes-on-a-heavy/m-p/173637#M34942</guid>
      <dc:creator>cdstealer</dc:creator>
      <dc:date>2015-03-10T17:14:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to split a log into multiple sourcetypes on a heavy forwarder?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-split-a-log-into-multiple-sourcetypes-on-a-heavy/m-p/173638#M34943</link>
      <description>&lt;P&gt;Hi @cdstealer&lt;/P&gt;

&lt;P&gt;Glad @somesoni2 helped you find a solution &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; don't forget to officially accept his answer by clicking on "Accept" directly below the answer to resolve this post and for both of you to receive karma points. Thanks!&lt;/P&gt;

&lt;P&gt;Patrick&lt;/P&gt;</description>
      <pubDate>Tue, 10 Mar 2015 23:39:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-split-a-log-into-multiple-sourcetypes-on-a-heavy/m-p/173638#M34943</guid>
      <dc:creator>ppablo</dc:creator>
      <dc:date>2015-03-10T23:39:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to split a log into multiple sourcetypes on a heavy forwarder?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-split-a-log-into-multiple-sourcetypes-on-a-heavy/m-p/173639#M34944</link>
      <description>&lt;P&gt;Thanks Patrick.. completely forgot.. doh! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Mar 2015 05:29:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-split-a-log-into-multiple-sourcetypes-on-a-heavy/m-p/173639#M34944</guid>
      <dc:creator>cdstealer</dc:creator>
      <dc:date>2015-03-11T05:29:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to split a log into multiple sourcetypes on a heavy forwarder?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-split-a-log-into-multiple-sourcetypes-on-a-heavy/m-p/173640#M34945</link>
      <description>&lt;P&gt;After splitting in to multiple source types how to set the default(here f5 source type ) to empty&lt;/P&gt;</description>
      <pubDate>Mon, 23 Mar 2015 12:35:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-split-a-log-into-multiple-sourcetypes-on-a-heavy/m-p/173640#M34945</guid>
      <dc:creator>vGreeshma</dc:creator>
      <dc:date>2015-03-23T12:35:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to split a log into multiple sourcetypes on a heavy forwarder?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-split-a-log-into-multiple-sourcetypes-on-a-heavy/m-p/173641#M34946</link>
      <description>&lt;P&gt;Sorry to resurrect an old thread due to my not understanding the solution given, but I have a very similar (if not exactly the same!) issue.&lt;/P&gt;

&lt;P&gt;I currently have one log file (  ba.mobile.log ) that gets fed into a single index ( ba_com_mobile_logs ) . The log file has custom events that all start with '|HDR1|' which I have created a custom source type call ba.com_activity_log.  There is also loads of xml data in the same log file that I would like treat as a separate sourcetype but still have the messages in the same index.&lt;/P&gt;

&lt;P&gt;Is this possible or should I split the two source types into two indexes. If it is possible, what the heck do I put into my props and transforms configs?&lt;/P&gt;

&lt;P&gt;The $SPLUNK_HOME/etc/apps/search/local/inputs.conf file on my forwarder looks like...&lt;/P&gt;

&lt;P&gt;[monitor::///ba/ba.mobile.log]&lt;BR /&gt;
index=ba_com_mobile_logs&lt;BR /&gt;
sourcetype=ba.com_activity_log&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 06:57:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-split-a-log-into-multiple-sourcetypes-on-a-heavy/m-p/173641#M34946</guid>
      <dc:creator>markwymer</dc:creator>
      <dc:date>2020-09-29T06:57:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to split a log into multiple sourcetypes on a heavy forwarder?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-split-a-log-into-multiple-sourcetypes-on-a-heavy/m-p/173642#M34947</link>
      <description>&lt;P&gt;Sorry, I also meant to add.....&lt;/P&gt;

&lt;P&gt;Thanks for any help.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Aug 2015 07:27:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-split-a-log-into-multiple-sourcetypes-on-a-heavy/m-p/173642#M34947</guid>
      <dc:creator>markwymer</dc:creator>
      <dc:date>2015-08-12T07:27:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to split a log into multiple sourcetypes on a heavy forwarder?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-split-a-log-into-multiple-sourcetypes-on-a-heavy/m-p/173643#M34948</link>
      <description>&lt;P&gt;The above suggestion is not correct since it didn't succeeded for me. I changed the following format:&lt;BR /&gt;
` [asm-set-sourcetype]&lt;BR /&gt;
 DEST_KEY = MetaData:Sourcetype&lt;BR /&gt;
 REGEX = (\sASM:\s)&lt;BR /&gt;
 FORMAT = sourcetype:asm_log&lt;/P&gt;

&lt;P&gt;[psm-set-sourcetype]&lt;BR /&gt;
 DEST_KEY = MetaData:Sourcetype&lt;BR /&gt;
 REGEX = (\sPSM:\s)&lt;BR /&gt;
 FORMAT = sourcetype:psm_log`&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 11:37:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-split-a-log-into-multiple-sourcetypes-on-a-heavy/m-p/173643#M34948</guid>
      <dc:creator>mbschriek</dc:creator>
      <dc:date>2020-09-29T11:37:15Z</dc:date>
    </item>
  </channel>
</rss>

