<?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 configure multiple sourcetypes for a single monitored file? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-multiple-sourcetypes-for-a-single-monitored/m-p/210824#M41530</link>
    <description>&lt;P&gt;This should be doable.&lt;/P&gt;

&lt;P&gt;What does your infrastructure look like?  Are you reading that file from a universal forwarder?  Where did you place your props/transforms.  They should be on some server that does parsing in your environment, typically an indexer or heavy forwarder.&lt;/P&gt;

&lt;P&gt;And of course, are you sure the regex is correct?&lt;/P&gt;

&lt;P&gt;If all of that looks good, what if you try placing the TRANSFORMS-myfileformats key into a [sourcetype1name] stanza since you are setting that explicitly on your inputs anyway.&lt;/P&gt;</description>
    <pubDate>Sun, 06 Mar 2016 02:12:34 GMT</pubDate>
    <dc:creator>maciep</dc:creator>
    <dc:date>2016-03-06T02:12:34Z</dc:date>
    <item>
      <title>How to configure multiple sourcetypes for a single monitored file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-multiple-sourcetypes-for-a-single-monitored/m-p/210823#M41529</link>
      <description>&lt;P&gt;Hi. &lt;/P&gt;

&lt;P&gt;I have a single very huge file with different formats. So I decided to create 3 different sourcetypes for this single file. I tried the below, but I did not succeed. Can any one point out where am I lagging?&lt;/P&gt;

&lt;P&gt;inputs.conf &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:///file/path/file.txt]
disabled = false
followTail = 0
index = main
sourcetype = sourcetype1name
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source::/file/path/file.txt]
TRANSFORMS-myfileformats = format1, format2, format3
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[format1]
REGEX =REGEX 1XXXXXXXXXXXX
FORMAT = sourcetype::Sourcetype2name
DEST_KEY = MetaData:Sourcetype

[format2]
REGEX = REGEX2XXXXXXXXXXXXXXXXXXX
FORMAT = sourcetype::Sourcetype3name
DEST_KEY = MetaData:Sourcetype

[format3]
REGEX = REGEX#XXXXXXXXXXXXXXXXXXXXXXXX
FORMAT = sourcetype::Sourcetype4name
DEST_KEY = MetaData:Sourcetype 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;These are my config files and am not sure what to be done here. I have not created the Sourcetype2, Sourcetype3, Sourcetype4 so far since Sourcetype cannot be created itself in 6.0 version. &lt;/P&gt;</description>
      <pubDate>Mon, 22 Feb 2016 17:53:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-multiple-sourcetypes-for-a-single-monitored/m-p/210823#M41529</guid>
      <dc:creator>KVinodh</dc:creator>
      <dc:date>2016-02-22T17:53:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure multiple sourcetypes for a single monitored file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-multiple-sourcetypes-for-a-single-monitored/m-p/210824#M41530</link>
      <description>&lt;P&gt;This should be doable.&lt;/P&gt;

&lt;P&gt;What does your infrastructure look like?  Are you reading that file from a universal forwarder?  Where did you place your props/transforms.  They should be on some server that does parsing in your environment, typically an indexer or heavy forwarder.&lt;/P&gt;

&lt;P&gt;And of course, are you sure the regex is correct?&lt;/P&gt;

&lt;P&gt;If all of that looks good, what if you try placing the TRANSFORMS-myfileformats key into a [sourcetype1name] stanza since you are setting that explicitly on your inputs anyway.&lt;/P&gt;</description>
      <pubDate>Sun, 06 Mar 2016 02:12:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-multiple-sourcetypes-for-a-single-monitored/m-p/210824#M41530</guid>
      <dc:creator>maciep</dc:creator>
      <dc:date>2016-03-06T02:12:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure multiple sourcetypes for a single monitored file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-multiple-sourcetypes-for-a-single-monitored/m-p/210825#M41531</link>
      <description>&lt;P&gt;Our expert said - &lt;/P&gt;

&lt;P&gt;Yeah this would have to be done on a heavy indexer, &lt;BR /&gt;
Which is also good for doing the parsing CPU processing on a heavy forwarder instead of the indexer.&lt;/P&gt;

&lt;P&gt;We could send this file(s) through syslog  (/etc/rsyslog.conf) to heavy forwarder too, then the heavy forwarder would transform the file.&lt;/P&gt;

&lt;P&gt;Only thing I would ask if the timestamps are going to be different. That would propose a new problem to solve. Having three different date formats in one file?&lt;/P&gt;</description>
      <pubDate>Mon, 07 Mar 2016 15:22:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-multiple-sourcetypes-for-a-single-monitored/m-p/210825#M41531</guid>
      <dc:creator>ddrillic</dc:creator>
      <dc:date>2016-03-07T15:22:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure multiple sourcetypes for a single monitored file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-multiple-sourcetypes-for-a-single-monitored/m-p/210826#M41532</link>
      <description>&lt;P&gt;I had the problem of different time formats in the same file. I used a script to parse the data out into separate files and ingest those, because it wasn't easy to correct the situation at the source. I was doing this on a heavy forwarder.&lt;/P&gt;

&lt;P&gt;here was my script: (with edits for understanding)&lt;/P&gt;

&lt;P&gt;grep SpecialLineHeader /path/to/file/myfile.txt | awk '{ print $1, $2, $3, $4, $5, $6 }' &amp;gt; /opt/splunk/etc/apps/mainframe/local/parsedSpecialLineSource/SpecialFile.txt&lt;/P&gt;</description>
      <pubDate>Mon, 07 Mar 2016 20:00:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-multiple-sourcetypes-for-a-single-monitored/m-p/210826#M41532</guid>
      <dc:creator>jgbricker</dc:creator>
      <dc:date>2016-03-07T20:00:03Z</dc:date>
    </item>
  </channel>
</rss>

