<?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 Can Splunk (Heavy Forwarder or any other Splunk component) Filter Field before Indexing in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Can-Splunk-Heavy-Forwarder-or-any-other-Splunk-component-Filter/m-p/43449#M8094</link>
    <description>&lt;P&gt;Can Splunk Filter data in field level before indexing ?&lt;/P&gt;

&lt;P&gt;Field level mean that we want to remove some field from event before indexing.&lt;BR /&gt;
From what I know, heavy forwarder has the capability to filter data, but it is only on “event level” -&amp;gt; mean that we can filter out all event with a specific type. But we can’t only filter some field&lt;/P&gt;

&lt;P&gt;I'm newbie in Splunk and this is my first question. Hopefully it help the others too &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 22 Aug 2013 12:36:48 GMT</pubDate>
    <dc:creator>luthfi49</dc:creator>
    <dc:date>2013-08-22T12:36:48Z</dc:date>
    <item>
      <title>Can Splunk (Heavy Forwarder or any other Splunk component) Filter Field before Indexing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-Splunk-Heavy-Forwarder-or-any-other-Splunk-component-Filter/m-p/43449#M8094</link>
      <description>&lt;P&gt;Can Splunk Filter data in field level before indexing ?&lt;/P&gt;

&lt;P&gt;Field level mean that we want to remove some field from event before indexing.&lt;BR /&gt;
From what I know, heavy forwarder has the capability to filter data, but it is only on “event level” -&amp;gt; mean that we can filter out all event with a specific type. But we can’t only filter some field&lt;/P&gt;

&lt;P&gt;I'm newbie in Splunk and this is my first question. Hopefully it help the others too &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Aug 2013 12:36:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-Splunk-Heavy-Forwarder-or-any-other-Splunk-component-Filter/m-p/43449#M8094</guid>
      <dc:creator>luthfi49</dc:creator>
      <dc:date>2013-08-22T12:36:48Z</dc:date>
    </item>
    <item>
      <title>Re: Can Splunk (Heavy Forwarder or any other Splunk component) Filter Field before Indexing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-Splunk-Heavy-Forwarder-or-any-other-Splunk-component-Filter/m-p/43450#M8095</link>
      <description>&lt;P&gt;See the following answer.  You can use this same type of filtering through RegEx.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://answers.splunk.com/answers/99905/how-to-forward-only-specific-windows-eventlogs-via-splunk-universal-forwarder"&gt;http://answers.splunk.com/answers/99905/how-to-forward-only-specific-windows-eventlogs-via-splunk-universal-forwarder&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Aug 2013 13:01:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-Splunk-Heavy-Forwarder-or-any-other-Splunk-component-Filter/m-p/43450#M8095</guid>
      <dc:creator>treinke</dc:creator>
      <dc:date>2013-08-22T13:01:05Z</dc:date>
    </item>
    <item>
      <title>Re: Can Splunk (Heavy Forwarder or any other Splunk component) Filter Field before Indexing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-Splunk-Heavy-Forwarder-or-any-other-Splunk-component-Filter/m-p/43451#M8096</link>
      <description>&lt;P&gt;Yes, you can filter events based on field values within the event.  But, it sounds like you are trying to change the value of a field to null, while saving the rest of the event.  Is that right?&lt;/P&gt;</description>
      <pubDate>Thu, 22 Aug 2013 13:02:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-Splunk-Heavy-Forwarder-or-any-other-Splunk-component-Filter/m-p/43451#M8096</guid>
      <dc:creator>lukejadamec</dc:creator>
      <dc:date>2013-08-22T13:02:55Z</dc:date>
    </item>
    <item>
      <title>Re: Can Splunk (Heavy Forwarder or any other Splunk component) Filter Field before Indexing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-Splunk-Heavy-Forwarder-or-any-other-Splunk-component-Filter/m-p/43452#M8097</link>
      <description>&lt;P&gt;Yes, logs can most certainly be filtered before indexing, just as you mention. However, the filtering is not based off an extracted field, simply because the fields are not yet extracted. &lt;/P&gt;

&lt;P&gt;The solution is to create a similar regex extraction as the one being performed at search time for most field extraction, and then modify the extracted data prior to indexing. It sounds more complicated than it is, but you need to have some grasp of regex syntax. See the example below, where parts of session_id's are being replaced with ####. You could create a regex that captures your desired field=field_value and replace it with nothing.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0.4/Data/Anonymizedatausingconfigurationfiles#Through_a_regex_transform" target="_blank"&gt;http://docs.splunk.com/Documentation/Splunk/5.0.4/Data/Anonymizedatausingconfigurationfiles#Through_a_regex_transform&lt;/A&gt;  &lt;/P&gt;

&lt;P&gt;Hope this helps,&lt;/P&gt;

&lt;P&gt;K&lt;/P&gt;

&lt;P&gt;For better help, always post a few sample events.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 14:37:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-Splunk-Heavy-Forwarder-or-any-other-Splunk-component-Filter/m-p/43452#M8097</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2020-09-28T14:37:41Z</dc:date>
    </item>
    <item>
      <title>Re: Can Splunk (Heavy Forwarder or any other Splunk component) Filter Field before Indexing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-Splunk-Heavy-Forwarder-or-any-other-Splunk-component-Filter/m-p/43453#M8098</link>
      <description>&lt;P&gt;like lukejadamec says in his comment, luthfi seems to want to change the contents of (or remove altogether) certain fields in events, not remove the whole event based on a field value.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Aug 2013 13:13:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-Splunk-Heavy-Forwarder-or-any-other-Splunk-component-Filter/m-p/43453#M8098</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2013-08-22T13:13:34Z</dc:date>
    </item>
    <item>
      <title>Re: Can Splunk (Heavy Forwarder or any other Splunk component) Filter Field before Indexing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-Splunk-Heavy-Forwarder-or-any-other-Splunk-component-Filter/m-p/43454#M8099</link>
      <description>&lt;P&gt;Yes, but not only change the value of the field to null, I want to remove the field.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2013 02:03:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-Splunk-Heavy-Forwarder-or-any-other-Splunk-component-Filter/m-p/43454#M8099</guid>
      <dc:creator>luthfi49</dc:creator>
      <dc:date>2013-08-23T02:03:12Z</dc:date>
    </item>
    <item>
      <title>Re: Can Splunk (Heavy Forwarder or any other Splunk component) Filter Field before Indexing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-Splunk-Heavy-Forwarder-or-any-other-Splunk-component-Filter/m-p/43455#M8100</link>
      <description>&lt;P&gt;Thanks, I will  try this first &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2013 02:06:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-Splunk-Heavy-Forwarder-or-any-other-Splunk-component-Filter/m-p/43455#M8100</guid>
      <dc:creator>luthfi49</dc:creator>
      <dc:date>2013-08-23T02:06:10Z</dc:date>
    </item>
    <item>
      <title>Re: Can Splunk (Heavy Forwarder or any other Splunk component) Filter Field before Indexing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-Splunk-Heavy-Forwarder-or-any-other-Splunk-component-Filter/m-p/43456#M8101</link>
      <description>&lt;P&gt;If you want any help with the construction of the regexes, you will need to provide some sample events. Mask sensitive data as needed. &lt;/P&gt;

&lt;P&gt;Good luck!&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2013 07:39:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-Splunk-Heavy-Forwarder-or-any-other-Splunk-component-Filter/m-p/43456#M8101</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2013-08-23T07:39:29Z</dc:date>
    </item>
    <item>
      <title>Re: Can Splunk (Heavy Forwarder or any other Splunk component) Filter Field before Indexing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-Splunk-Heavy-Forwarder-or-any-other-Splunk-component-Filter/m-p/43457#M8102</link>
      <description>&lt;P&gt;well I have try that and the filtering still not working,&lt;BR /&gt;
Actually my concern is to reduce the license usage by removing field. The link you provide generally is used to masking data in indexer.&lt;BR /&gt;
So What I try is edit props and transform in heavy forwarder to mask the field to null value.&lt;BR /&gt;
I still don't know why it is not working. I will try again later &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2013 06:58:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-Splunk-Heavy-Forwarder-or-any-other-Splunk-component-Filter/m-p/43457#M8102</guid>
      <dc:creator>luthfi49</dc:creator>
      <dc:date>2013-08-27T06:58:31Z</dc:date>
    </item>
    <item>
      <title>Re: Can Splunk (Heavy Forwarder or any other Splunk component) Filter Field before Indexing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-Splunk-Heavy-Forwarder-or-any-other-Splunk-component-Filter/m-p/43458#M8103</link>
      <description>&lt;P&gt;Here is my props.conf&lt;BR /&gt;
&lt;CODE&gt;[xxxxtesfilterxxxxxx]&lt;BR /&gt;
TRANSFORMS-anonymize = remove-fieldtes&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;my transform.conf&lt;BR /&gt;
&lt;CODE&gt;[remove-fieldtes]&lt;/CODE&gt;&lt;BR /&gt;
&lt;CODE&gt;REGEX=(?msi)^(.*?)(Domain=.*?)(EPC-SubscriberId.*?)(EPC-SubscriberId=.*?)(\,.*?)$&lt;/CODE&gt;&lt;BR /&gt;
&lt;CODE&gt;FORMAT=$1$4&lt;/CODE&gt;&lt;BR /&gt;
&lt;CODE&gt;DEST_KEY=_raw&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2013 06:58:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-Splunk-Heavy-Forwarder-or-any-other-Splunk-component-Filter/m-p/43458#M8103</guid>
      <dc:creator>luthfi49</dc:creator>
      <dc:date>2013-08-27T06:58:41Z</dc:date>
    </item>
    <item>
      <title>Re: Can Splunk (Heavy Forwarder or any other Splunk component) Filter Field before Indexing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-Splunk-Heavy-Forwarder-or-any-other-Splunk-component-Filter/m-p/43459#M8104</link>
      <description>&lt;P&gt;sample event (I change some values)&lt;BR /&gt;
&lt;CODE&gt;XXXXX: Tue Aug 27 13:25:11 2013,  Host:úú Tue Aug 27 13:25:22 2013&lt;BR /&gt;
Field1; Field2; Domain=EPC-SubscriberId=ValueDomain,NextField=NextValue,EPC-SubscriberId=ValueEPC,NextField=ValueField&lt;/CODE&gt;&lt;BR /&gt;
&lt;CODE&gt;XXXXX: Tue Aug 27 13:25:12 2013,  Host:úú Tue Aug 27 13:25:22 2013&lt;BR /&gt;
Field1; Field2; Domain=EPC-SubscriberId=ValueDomain,NextField=NextValue,EPC-SubscriberId=ValueEPC,NextField=ValueField&lt;/CODE&gt;&lt;BR /&gt;
&lt;CODE&gt;XXXXX: Tue Aug 27 13:25:13 2013,  Host:úú Tue Aug 27 13:25:22 2013&lt;BR /&gt;
Field1; Field2; Domain=EPC-SubscriberId=ValueDomain,NextField=NextValue,EPC-SubscriberId=ValueEPC,NextField=ValueField&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2013 06:59:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-Splunk-Heavy-Forwarder-or-any-other-Splunk-component-Filter/m-p/43459#M8104</guid>
      <dc:creator>luthfi49</dc:creator>
      <dc:date>2013-08-27T06:59:03Z</dc:date>
    </item>
    <item>
      <title>Re: Can Splunk (Heavy Forwarder or any other Splunk component) Filter Field before Indexing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-Splunk-Heavy-Forwarder-or-any-other-Splunk-component-Filter/m-p/43460#M8105</link>
      <description>&lt;P&gt;I take it that you have read the docs at &lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0.4/Data/Anonymizedatausingconfigurationfiles" target="_blank"&gt;http://docs.splunk.com/Documentation/Splunk/5.0.4/Data/Anonymizedatausingconfigurationfiles&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;From what I understand you want to remove the higlighted portions;&lt;/P&gt;

&lt;P&gt;XXXXX: Tue Aug 27 13:25:13 2013, Host:úú Tue Aug 27 13:25:22 2013 Field1; Field2; &lt;STRONG&gt;Domain=EPC-SubscriberId=ValueDomain,NextField=NextValue,&lt;/STRONG&gt;EPC-SubscriberId=ValueEPC*&lt;EM&gt;,NextField=ValueField&lt;/EM&gt;*&lt;/P&gt;

&lt;P&gt;is that correct?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 14:39:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-Splunk-Heavy-Forwarder-or-any-other-Splunk-component-Filter/m-p/43460#M8105</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2020-09-28T14:39:37Z</dc:date>
    </item>
    <item>
      <title>Re: Can Splunk (Heavy Forwarder or any other Splunk component) Filter Field before Indexing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-Splunk-Heavy-Forwarder-or-any-other-Splunk-component-Filter/m-p/43461#M8106</link>
      <description>&lt;P&gt;After I checked again, the filtering is work !, and the license used is smaller than the size of the file log.&lt;/P&gt;

&lt;P&gt;Thank you very much for the help !&lt;/P&gt;

&lt;P&gt;To make sure I will try it for another case.&lt;/P&gt;

&lt;P&gt;And yes, the field I want to remove is this "field" (I don't know how to highlight it) &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;XXXXX: Tue Aug 27 13:25:13 2013, Host:úú Tue Aug 27 13:25:22 2013 Field1; Field2; &lt;/P&gt;

&lt;P&gt;"Domain=EPC-SubscriberId=ValueDomain,NextField=NextValue,"&lt;/P&gt;

&lt;P&gt;EPC-SubscriberId=ValueEPC,&lt;/P&gt;

&lt;P&gt;"NextField=ValueField"&lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2013 10:29:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-Splunk-Heavy-Forwarder-or-any-other-Splunk-component-Filter/m-p/43461#M8106</guid>
      <dc:creator>luthfi49</dc:creator>
      <dc:date>2013-08-27T10:29:52Z</dc:date>
    </item>
    <item>
      <title>Re: Can Splunk (Heavy Forwarder or any other Splunk component) Filter Field before Indexing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-Splunk-Heavy-Forwarder-or-any-other-Splunk-component-Filter/m-p/43462#M8107</link>
      <description>&lt;P&gt;The easiest way to achieve this would be a SEDCMD.&lt;/P&gt;

&lt;P&gt;See &lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0.4/admin/Propsconf"&gt;http://docs.splunk.com/Documentation/Splunk/5.0.4/admin/Propsconf&lt;/A&gt; for how to configure an SEDCMD. You can simply replace the parts you want to remove with "nothing".&lt;/P&gt;

&lt;P&gt;E.g.:&lt;BR /&gt;
props.conf:&lt;/P&gt;

&lt;P&gt;[xxxxtesfilterxxxxxx]&lt;BR /&gt;
SEDCMD-test = s/Domain=EPC-SubscriberId=[^,]+,//g&lt;BR /&gt;
SEDCMD-test2 = s/EPC-SubscriberId=[^,]+,//g&lt;/P&gt;

&lt;P&gt;This is untested. Please test in a dev enviroment bevore roling it out to production.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2013 10:47:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-Splunk-Heavy-Forwarder-or-any-other-Splunk-component-Filter/m-p/43462#M8107</guid>
      <dc:creator>fbl_itcs</dc:creator>
      <dc:date>2013-08-27T10:47:42Z</dc:date>
    </item>
  </channel>
</rss>

