<?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: Ingestion: Dividing 3 sections of data in TSV. in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Ingestion-Dividing-3-sections-of-data-in-TSV/m-p/401779#M71514</link>
    <description>&lt;P&gt;Well, true, but I expect your line breaking will take care of that.  And perhaps it'll need a little tweaking, but that's &lt;A href="http://docs.splunk.com/Special:SplunkSearch/docs?q=line+break"&gt;well documented&lt;/A&gt;.  As long as the lines break properly, which is a very testable thing - just ingest into a temporary index to test them out then you can just delete that index and use those same settings into production - then everything else should work fine.&lt;/P&gt;</description>
    <pubDate>Tue, 27 Nov 2018 13:51:40 GMT</pubDate>
    <dc:creator>Richfez</dc:creator>
    <dc:date>2018-11-27T13:51:40Z</dc:date>
    <item>
      <title>Ingestion: Dividing 3 sections of data in TSV.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Ingestion-Dividing-3-sections-of-data-in-TSV/m-p/401770#M71505</link>
      <description>&lt;P&gt;Good day Splunkers!&lt;/P&gt;

&lt;P&gt;We have this case that in one TSV are 3 types or categories of data.&lt;/P&gt;

&lt;P&gt;The first and third section of data can be ingested normally, but the problem is the second one. It is a receipt. Is there any way that the indexer knows when to divide and ingest those sections?&lt;/P&gt;

&lt;P&gt;By the way, each section has a somehow unique marker like:&lt;/P&gt;

&lt;P&gt;SECTION1980980989&lt;BR /&gt;
SECTION1098098435&lt;BR /&gt;
SECTION1345873485&lt;BR /&gt;
SECTION1098340982&lt;BR /&gt;
RECEIPT10912831921&lt;BR /&gt;
RECEIPT10912830912&lt;BR /&gt;
RECEIPT10983459821&lt;BR /&gt;
RECEIPT19898281921&lt;BR /&gt;
RECEIPT10910293849&lt;BR /&gt;
SECTION298129381&lt;BR /&gt;
SECTION298493859&lt;BR /&gt;
SECTION298439588&lt;BR /&gt;
SECTION203948533&lt;/P&gt;

&lt;P&gt;This is the sample for the TSV. I only indicated the "unique" marker since I want to know if there's a way Splunk can determine how to divide and ingest those three sections of data.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Nov 2018 07:30:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Ingestion-Dividing-3-sections-of-data-in-TSV/m-p/401770#M71505</guid>
      <dc:creator>rajyah</dc:creator>
      <dc:date>2018-11-23T07:30:06Z</dc:date>
    </item>
    <item>
      <title>Re: Ingestion: Dividing 3 sections of data in TSV.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Ingestion-Dividing-3-sections-of-data-in-TSV/m-p/401771#M71506</link>
      <description>&lt;P&gt;Why can it not ingest the second section?  And by "ingest" what exactly do we mean?  And to what effect would dividing it give you?&lt;/P&gt;

&lt;P&gt;Or let me ask more particular questions about something I'm guessing: You have extractions happening on the data, which turns gobbledygook raw logs into pretty fields.  For the ones with SECTION this is OK, but with RECEIPT ones it's not working right?&lt;/P&gt;

&lt;P&gt;Let us know if that sounds like the problem. If it is not, that's OK too, if you could provide a little better example of one event that works right and one that doesn't, and a better description of what it means to not be working right, I think that would help a lot.  But never fear, I'm sure we can figure this out.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Nov 2018 15:04:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Ingestion-Dividing-3-sections-of-data-in-TSV/m-p/401771#M71506</guid>
      <dc:creator>Richfez</dc:creator>
      <dc:date>2018-11-23T15:04:24Z</dc:date>
    </item>
    <item>
      <title>Re: Ingestion: Dividing 3 sections of data in TSV.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Ingestion-Dividing-3-sections-of-data-in-TSV/m-p/401772#M71507</link>
      <description>&lt;P&gt;Thank you for responding!&lt;/P&gt;

&lt;P&gt;Sorry, I think I poorly explained what the post meant.&lt;/P&gt;

&lt;P&gt;The ingestion is fine, the thing is is there a way to divide those three sections of data? Like ingesting it to different index coming from 1 TSV. &lt;/P&gt;

&lt;P&gt;Sorry if my explanation is poor. &lt;/P&gt;</description>
      <pubDate>Fri, 23 Nov 2018 15:12:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Ingestion-Dividing-3-sections-of-data-in-TSV/m-p/401772#M71507</guid>
      <dc:creator>rajyah</dc:creator>
      <dc:date>2018-11-23T15:12:01Z</dc:date>
    </item>
    <item>
      <title>Re: Ingestion: Dividing 3 sections of data in TSV.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Ingestion-Dividing-3-sections-of-data-in-TSV/m-p/401773#M71508</link>
      <description>&lt;P&gt;Knowing better what's needed here, hopefully this is the right answer.&lt;/P&gt;

&lt;P&gt;What's apparently needed is that for this one input, some events should go to indexA, other events should go to indexB.&lt;/P&gt;

&lt;P&gt;This is possible.  I'm pretty sure there's no way to do this in the UI, so you'll have to manually edit configuration files by hand.  But it's not too hard if you take your time, think about what you are doing, and test.  Also make backups of your configurations before you start!  (It's as easy as tar'ing them up, or making a copy.)&lt;/P&gt;

&lt;P&gt;Your main idea is to us the &lt;A href="http://docs.splunk.com/Documentation/Splunk/7.2.1/Forwarding/Routeandfilterdatad"&gt;route and filter data&lt;/A&gt; section in the Splunk documentation.  This gives a good overview and specifics for quite a few scenarios - unfortunately, your specific one isn't in there.&lt;/P&gt;

&lt;P&gt;But there is help, once you know how to look for it.  For instance, a web search for "splunk dest_key=index" turns up &lt;A href="https://answers.splunk.com/answers/100609/redirection-to-different-index-using-transforms-conf.html"&gt;this answer&lt;/A&gt;.&lt;/P&gt;

&lt;P&gt;We can modify it though.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; ### transforms.conf
 [index_redirect_section]
 REGEX = ^SECTION
 DEST_KEY = _MetaData:Index
 FORMAT = name_of_index_for_section_events

 [index_redirect_receipt]
 REGEX = ^RECEIPT
 DEST_KEY = _MetaData:Index
 FORMAT = name_of_index_for_receipt_events

 ### props.conf
 [sourcetype, host, or source that you want to redirect - see the docs for examples] 
 TRANSFORMS-route_different_indexes = index_redirect_section, index_redirect_receipt
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Now, some caveats:&lt;BR /&gt;
First, make sure you are editing local versions of the conf files, not default.  So not $SPLUNKHOME/etc/apps/myapp/default/props.conf, but instead $SPLUNKHOME/etc/apps/myapp/local/props.conf.&lt;/P&gt;

&lt;P&gt;Second, these regular expressions will only work if RECEIPT or SECTION is at the beginning of the event.  If not, remove the "^" from the front of that.  But ... lots of testing needs to be done, because if the wrong word appears &lt;EM&gt;anywhere&lt;/EM&gt; in the event, well, unpredictable things may happen.  But as long as that doesn't happen, it should work.&lt;/P&gt;

&lt;P&gt;Third, the &lt;CODE&gt;[sourcetype, host or source that you want to redirect]&lt;/CODE&gt; section - you didn't provide what the sourcetype is, the source, or anything at all for us to work with, so you are on your own there for implementing that.  We can help, but hopefully the examples in the route and filter data docs, plus the words I used above, will help you enough to get that sorted out.&lt;/P&gt;

&lt;P&gt;So, generally, adding the section into the local props.conf tells Splunk to run a transform on the data as it comes in.  Indeed, it tells it to run TWO transforms.   So it'll check transforms.conf for the stanzas it needs, and run both in order. So, if the regex matches SECTION, it'll rewrite the destination index of that event and tell it to go to index &lt;CODE&gt;name_of_index_for_section_events&lt;/CODE&gt;.  It then continues and runs the next one, which if it matches (RECEIPT) it'll rewrite the index to be &lt;CODE&gt;name_of_index_for_receipt_events&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;So, give that a try and see how it works.  If you have problems, especially in this particular case details will matter - what you've tried, copies of the configurations you've put into place, and what exactly happens.&lt;/P&gt;

&lt;P&gt;Happy Splunking,&lt;BR /&gt;
Rich&lt;/P&gt;</description>
      <pubDate>Fri, 23 Nov 2018 16:42:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Ingestion-Dividing-3-sections-of-data-in-TSV/m-p/401773#M71508</guid>
      <dc:creator>Richfez</dc:creator>
      <dc:date>2018-11-23T16:42:25Z</dc:date>
    </item>
    <item>
      <title>Re: Ingestion: Dividing 3 sections of data in TSV.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Ingestion-Dividing-3-sections-of-data-in-TSV/m-p/401774#M71509</link>
      <description>&lt;P&gt;I'll consider this as an answer since this is the answer I'm looking for! Thank you for the concrete and detailed explanation about my inquiry. As I thought, I really should fiddle around with props/transforms.conf. &lt;/P&gt;

&lt;P&gt;Again, thank you! &lt;/P&gt;</description>
      <pubDate>Sat, 24 Nov 2018 01:12:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Ingestion-Dividing-3-sections-of-data-in-TSV/m-p/401774#M71509</guid>
      <dc:creator>rajyah</dc:creator>
      <dc:date>2018-11-24T01:12:26Z</dc:date>
    </item>
    <item>
      <title>Re: Ingestion: Dividing 3 sections of data in TSV.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Ingestion-Dividing-3-sections-of-data-in-TSV/m-p/401775#M71510</link>
      <description>&lt;P&gt;You are welcome.  If you get into any &lt;EM&gt;specific&lt;/EM&gt; minor issues with this, be sure to post back here (like, the regex may need a tiny bit of tweaking).  &lt;/P&gt;

&lt;P&gt;Otherwise, have fun in props.conf!  It's  whole new world!&lt;/P&gt;

&lt;P&gt;-Rich&lt;/P&gt;</description>
      <pubDate>Sat, 24 Nov 2018 12:45:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Ingestion-Dividing-3-sections-of-data-in-TSV/m-p/401775#M71510</guid>
      <dc:creator>Richfez</dc:creator>
      <dc:date>2018-11-24T12:45:03Z</dc:date>
    </item>
    <item>
      <title>Re: Ingestion: Dividing 3 sections of data in TSV.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Ingestion-Dividing-3-sections-of-data-in-TSV/m-p/401776#M71511</link>
      <description>&lt;P&gt;Ah! It seems I forgot to mention something. Do you think it's possible playing with this? If possible I want to know your idea regarding this:&lt;/P&gt;

&lt;P&gt;FIELD1[tab]FIELD2[tab]FIELD3[tab]FIELD4[tab]FIELD5[tab]&lt;BR /&gt;
SECTION1980980989[tab]VALUES1[tab]VALUES2[tab]VALUES3[tab]VALUES4[tab]VALUES5&lt;BR /&gt;
SECTION1098098435[tab]VALUES1[tab]VALUES2[tab]VALUES3[tab]VALUES4[tab]VALUES5&lt;BR /&gt;
SECTION1345873485[tab]VALUES1[tab]VALUES2[tab]VALUES3[tab]VALUES4[tab]VALUES5&lt;BR /&gt;
SECTION1098340982[tab]VALUES1[tab]VALUES2[tab]VALUES3[tab]VALUES4[tab]VALUES5&lt;BR /&gt;
FIELD1[tab]FIELD2[tab]FIELD3[tab]FIELD4[tab]FIELD5[tab]&lt;BR /&gt;
RECEIPT10912831921[tab]VALUES1[tab]VALUES2[tab]VALUES3[tab]VALUES4[tab]VALUES5&lt;BR /&gt;
RECEIPT10912830912[tab]VALUES1[tab]VALUES2[tab]VALUES3[tab]VALUES4[tab]VALUES5&lt;BR /&gt;
RECEIPT10983459821[tab]VALUES1[tab]VALUES2[tab]VALUES3[tab]VALUES4[tab]VALUES5&lt;BR /&gt;
RECEIPT19898281921[tab]VALUES1[tab]VALUES2[tab]VALUES3[tab]VALUES4[tab]VALUES5&lt;BR /&gt;
RECEIPT10910293849[tab]VALUES1[tab]VALUES2[tab]VALUES3[tab]VALUES4[tab]VALUES5&lt;BR /&gt;
FIELD1[tab]FIELD2[tab]FIELD3[tab]FIELD4[tab]FIELD5[tab]&lt;BR /&gt;
SECTION298129381&lt;BR /&gt;
SECTION298493859&lt;BR /&gt;
SECTION298439588&lt;BR /&gt;
SECTION203948533&lt;/P&gt;

&lt;P&gt;I forgot to include the fields. But yeah, I think that's the structure of the log. Have any thoughts about this, sir? Have you already experienced this case? Please enlightened me. &lt;/P&gt;</description>
      <pubDate>Mon, 26 Nov 2018 01:32:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Ingestion-Dividing-3-sections-of-data-in-TSV/m-p/401776#M71511</guid>
      <dc:creator>rajyah</dc:creator>
      <dc:date>2018-11-26T01:32:15Z</dc:date>
    </item>
    <item>
      <title>Re: Ingestion: Dividing 3 sections of data in TSV.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Ingestion-Dividing-3-sections-of-data-in-TSV/m-p/401777#M71512</link>
      <description>&lt;P&gt;That looks like it should work fine with what we had discovered before.  The leading &lt;CODE&gt;^&lt;/CODE&gt; in the REGEX should probably be OK, too, which makes it more efficient (that symbol tells the regex engine to look at the start of the string for each word, like "SECTION", so it doesn't have to waste time looking through the &lt;EM&gt;whole&lt;/EM&gt; thing.)&lt;/P&gt;

&lt;P&gt;I do see one thing that might not be handled properly.  Unless I'm misreading the logs, you have a line that has only fields, with no leading "RECEIPT" or "SECTION" in it.  What did you want done with those?  If you want it to go to either one of those indexes we've already defined, then there's an easy answer:&lt;/P&gt;

&lt;P&gt;On the input itself make sure you set the &lt;CODE&gt;index=blah&lt;/CODE&gt; setting.  That will be the "Default" index those events will go to, an indeed any event that doesn't match our specific redirections to other indexes will just go to that default index.  It can be the same as one of the specific indexes - that's no problem at all.  &lt;/P&gt;

&lt;P&gt;Also how are you assigning time stamps?&lt;/P&gt;</description>
      <pubDate>Mon, 26 Nov 2018 14:06:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Ingestion-Dividing-3-sections-of-data-in-TSV/m-p/401777#M71512</guid>
      <dc:creator>Richfez</dc:creator>
      <dc:date>2018-11-26T14:06:48Z</dc:date>
    </item>
    <item>
      <title>Re: Ingestion: Dividing 3 sections of data in TSV.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Ingestion-Dividing-3-sections-of-data-in-TSV/m-p/401778#M71513</link>
      <description>&lt;P&gt;The log presented is like 3 different logs compiled in one. So each logs(SECTION1,RECEIPT,SECTION2) has different field data. What I'm worried about is the fields of RECEIPT and SECTION2 logs might be considered as events when ingested. But I'll try fiddling first with props.conf and will give an update. Thank you sir! I've at least got an idea with this. &lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Nov 2018 02:39:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Ingestion-Dividing-3-sections-of-data-in-TSV/m-p/401778#M71513</guid>
      <dc:creator>rajyah</dc:creator>
      <dc:date>2018-11-27T02:39:07Z</dc:date>
    </item>
    <item>
      <title>Re: Ingestion: Dividing 3 sections of data in TSV.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Ingestion-Dividing-3-sections-of-data-in-TSV/m-p/401779#M71514</link>
      <description>&lt;P&gt;Well, true, but I expect your line breaking will take care of that.  And perhaps it'll need a little tweaking, but that's &lt;A href="http://docs.splunk.com/Special:SplunkSearch/docs?q=line+break"&gt;well documented&lt;/A&gt;.  As long as the lines break properly, which is a very testable thing - just ingest into a temporary index to test them out then you can just delete that index and use those same settings into production - then everything else should work fine.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Nov 2018 13:51:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Ingestion-Dividing-3-sections-of-data-in-TSV/m-p/401779#M71514</guid>
      <dc:creator>Richfez</dc:creator>
      <dc:date>2018-11-27T13:51:40Z</dc:date>
    </item>
  </channel>
</rss>

