<?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 remove a field from data before indexing? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-a-field-from-data-before-indexing/m-p/260329#M49978</link>
    <description>&lt;P&gt;I would advise against deleting the time information after Last_Action. What if you wanted to use it in a search?&lt;BR /&gt;
You could simply tell splunk where to break events and where to look for the timestamp of the event itself explicitly, like so:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[mobile]
LINE_BREAKER=([\r\n]+)\d{4}-
SHOULD_LINEMERGE=false
TIME_PREFIX=^
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This should break your events properly and still retain all data.&lt;/P&gt;</description>
    <pubDate>Thu, 03 Dec 2015 08:31:35 GMT</pubDate>
    <dc:creator>jeffland</dc:creator>
    <dc:date>2015-12-03T08:31:35Z</dc:date>
    <item>
      <title>How to remove a field from data before indexing?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-a-field-from-data-before-indexing/m-p/260323#M49972</link>
      <description>&lt;P&gt;Hi All;&lt;/P&gt;

&lt;P&gt;I have an interesting issue. Currently, I have data free flowing into a port on in Splunk, and one of the fields in this data has become corrupt and is not allowing me to search my data correctly. What I want to do is remove this field from the data before it is indexed. Is there any way I can do this in Splunk itself? &lt;/P&gt;

&lt;P&gt;Note: I really want to avoid sending the data else where for this change to be made and then sending it to Splunk, and I would want to not be limited the option of changing the field in the source. &lt;/P&gt;

&lt;P&gt;Any suggestions are greatly appreciated as always. &lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
Tyler&lt;/P&gt;</description>
      <pubDate>Wed, 02 Dec 2015 19:23:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-a-field-from-data-before-indexing/m-p/260323#M49972</guid>
      <dc:creator>tdiestel</dc:creator>
      <dc:date>2015-12-02T19:23:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove a field from data before indexing?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-a-field-from-data-before-indexing/m-p/260324#M49973</link>
      <description>&lt;P&gt;I came across this document see if it's of any help.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.0/Forwarding/Routeandfilterdatad"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.0/Forwarding/Routeandfilterdatad&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Dec 2015 19:40:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-a-field-from-data-before-indexing/m-p/260324#M49973</guid>
      <dc:creator>techboyt28</dc:creator>
      <dc:date>2015-12-02T19:40:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove a field from data before indexing?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-a-field-from-data-before-indexing/m-p/260325#M49974</link>
      <description>&lt;P&gt;See if this helps,&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.0/Forwarding/Routeandfilterdatad"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.0/Forwarding/Routeandfilterdatad&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Dec 2015 19:41:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-a-field-from-data-before-indexing/m-p/260325#M49974</guid>
      <dc:creator>techboyt28</dc:creator>
      <dc:date>2015-12-02T19:41:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove a field from data before indexing?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-a-field-from-data-before-indexing/m-p/260326#M49975</link>
      <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.0/Data/Anonymizedatausingconfigurationfiles"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.0/Data/Anonymizedatausingconfigurationfiles&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Dec 2015 21:18:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-a-field-from-data-before-indexing/m-p/260326#M49975</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-12-02T21:18:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove a field from data before indexing?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-a-field-from-data-before-indexing/m-p/260327#M49976</link>
      <description>&lt;P&gt;These are good pointers, and I'm still trying to see if I can make this work. To be more specific of the field that is corrupting my data is this field has a timestamp component to it. &lt;/P&gt;

&lt;P&gt;Scenario: A single event is sent to splunk that looks like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;2015-12-02T15:34:45-0800
User: Jim
Event_Name: "Click_Event"
Action_Type: "Lower_Menu_Item"
Last_Action: "click_2015-12-01T12:00:00-0800"
Last_Action_Type: "Upper Right Button"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Splunk then indexes this single event as 2 events:&lt;/P&gt;

&lt;P&gt;One like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;_time: 2015-12-02T15:34:45-0800
2015-12-02T15:34:45-0800
User: Jim
Event_Name: "Click_Event"
Action_Type: "Lower_Menu_Item"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The other like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;_time: 2015-12-01T12:00:00-0800"
Last_Action: "click_2015-12-01T12:00:00-0800"
Last_Action_Type: "Upper Right Button"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;End Goal: Stop splunk from splitting up my events.&lt;BR /&gt;
Would settle for removing the "Last_Action" field if I can do it before splunk splits the event. &lt;/P&gt;</description>
      <pubDate>Wed, 02 Dec 2015 23:53:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-a-field-from-data-before-indexing/m-p/260327#M49976</guid>
      <dc:creator>tdiestel</dc:creator>
      <dc:date>2015-12-02T23:53:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove a field from data before indexing?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-a-field-from-data-before-indexing/m-p/260328#M49977</link>
      <description>&lt;P&gt;Tried this in our props.conf file  just to remove the field entirely but still no success. Is there something I'm doing wrong?&lt;/P&gt;

&lt;P&gt;[mobile] &lt;BR /&gt;
SEDCMD-nonrequiredtimestamps = s/[Last_Action =].*/Last_Action =/g &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 08:03:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-a-field-from-data-before-indexing/m-p/260328#M49977</guid>
      <dc:creator>tdiestel</dc:creator>
      <dc:date>2020-09-29T08:03:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove a field from data before indexing?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-a-field-from-data-before-indexing/m-p/260329#M49978</link>
      <description>&lt;P&gt;I would advise against deleting the time information after Last_Action. What if you wanted to use it in a search?&lt;BR /&gt;
You could simply tell splunk where to break events and where to look for the timestamp of the event itself explicitly, like so:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[mobile]
LINE_BREAKER=([\r\n]+)\d{4}-
SHOULD_LINEMERGE=false
TIME_PREFIX=^
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This should break your events properly and still retain all data.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Dec 2015 08:31:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-a-field-from-data-before-indexing/m-p/260329#M49978</guid>
      <dc:creator>jeffland</dc:creator>
      <dc:date>2015-12-03T08:31:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove a field from data before indexing?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-a-field-from-data-before-indexing/m-p/260330#M49979</link>
      <description>&lt;P&gt;Then you asked the wrong question.  See what @jeffland said.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Dec 2015 17:45:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-a-field-from-data-before-indexing/m-p/260330#M49979</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-12-03T17:45:50Z</dc:date>
    </item>
  </channel>
</rss>

