<?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 How do you modify data values before indexing? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-do-you-modify-data-values-before-indexing/m-p/450200#M78166</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;

&lt;P&gt;I want to remove more than 2 white spaces from event values at heavy forwarder before ingesting to indexer. Can anyone guide me with this change so that I can be able to fix the issue. &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Current State :&lt;/STRONG&gt; &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;field1="xxxxxx", field2="xxx                          ", field3="xxx    ", field4="x", field5="xxxx                                                                       ", field6="xxx  ", field7="xxx                                                                                            ", field8="xxxx                                                                                           ", field9="xxxxx                                                                                                                                                                                                                                   ", field10="xxxxx"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Required State&lt;/STRONG&gt;&lt;BR /&gt;
field1="xxxxxx", field2="xxx", field3="xxx", field4="x", field5="xxxx", field6="xxx", field7="xxx", field8="xxxx", field9="xxxxx", field10="xxxxx"&lt;/P&gt;</description>
    <pubDate>Thu, 06 Sep 2018 12:03:24 GMT</pubDate>
    <dc:creator>soumyacharya91</dc:creator>
    <dc:date>2018-09-06T12:03:24Z</dc:date>
    <item>
      <title>How do you modify data values before indexing?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-you-modify-data-values-before-indexing/m-p/450200#M78166</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;

&lt;P&gt;I want to remove more than 2 white spaces from event values at heavy forwarder before ingesting to indexer. Can anyone guide me with this change so that I can be able to fix the issue. &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Current State :&lt;/STRONG&gt; &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;field1="xxxxxx", field2="xxx                          ", field3="xxx    ", field4="x", field5="xxxx                                                                       ", field6="xxx  ", field7="xxx                                                                                            ", field8="xxxx                                                                                           ", field9="xxxxx                                                                                                                                                                                                                                   ", field10="xxxxx"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Required State&lt;/STRONG&gt;&lt;BR /&gt;
field1="xxxxxx", field2="xxx", field3="xxx", field4="x", field5="xxxx", field6="xxx", field7="xxx", field8="xxxx", field9="xxxxx", field10="xxxxx"&lt;/P&gt;</description>
      <pubDate>Thu, 06 Sep 2018 12:03:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-you-modify-data-values-before-indexing/m-p/450200#M78166</guid>
      <dc:creator>soumyacharya91</dc:creator>
      <dc:date>2018-09-06T12:03:24Z</dc:date>
    </item>
    <item>
      <title>Re: How do you modify data values before indexing?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-you-modify-data-values-before-indexing/m-p/450201#M78167</link>
      <description>&lt;P&gt;Hi @soumyacharya91,&lt;/P&gt;

&lt;P&gt;If you have consistent same data in single sourcetype in that case you can implement below configuration in props.conf on Indexer or Heavy Forwarder whichever comes first from UF.&lt;/P&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[yoursourcetype]
SEDCMD-removewhitespace = s/\b(?:(\w+))\b=\"(?:(\w+).*?)\"/\1="\2"/g
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Restart splunk on Indexer/Heavy Forwarder.&lt;/P&gt;

&lt;P&gt;For your reference here is regex with sample data &lt;A href="https://regex101.com/r/wf7DAH/1"&gt;https://regex101.com/r/wf7DAH/1&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Sep 2018 12:59:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-you-modify-data-values-before-indexing/m-p/450201#M78167</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2018-09-06T12:59:49Z</dc:date>
    </item>
    <item>
      <title>Re: How do you modify data values before indexing?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-you-modify-data-values-before-indexing/m-p/450202#M78168</link>
      <description>&lt;P&gt;It is coming from db input.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Sep 2018 13:27:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-you-modify-data-values-before-indexing/m-p/450202#M78168</guid>
      <dc:creator>soumyacharya91</dc:creator>
      <dc:date>2018-09-06T13:27:32Z</dc:date>
    </item>
    <item>
      <title>Re: How do you modify data values before indexing?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-you-modify-data-values-before-indexing/m-p/450203#M78169</link>
      <description>&lt;P&gt;You can implement above configuration on server on which Splunk DB Connect is installed, here I am guessing that you have configured DB Input in DB Connect to pull data at certain interval from Database.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Sep 2018 13:30:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-you-modify-data-values-before-indexing/m-p/450203#M78169</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2018-09-06T13:30:52Z</dc:date>
    </item>
    <item>
      <title>Re: How do you modify data values before indexing?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-you-modify-data-values-before-indexing/m-p/450204#M78170</link>
      <description>&lt;P&gt;Thanks a lot It is now fixed. You deserve a Chocolate  !!&lt;/P&gt;</description>
      <pubDate>Thu, 06 Sep 2018 13:37:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-you-modify-data-values-before-indexing/m-p/450204#M78170</guid>
      <dc:creator>soumyacharya91</dc:creator>
      <dc:date>2018-09-06T13:37:18Z</dc:date>
    </item>
    <item>
      <title>Re: How do you modify data values before indexing?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-you-modify-data-values-before-indexing/m-p/450205#M78171</link>
      <description>&lt;P&gt;Great it worked, chcolate pending &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Sep 2018 13:39:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-you-modify-data-values-before-indexing/m-p/450205#M78171</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2018-09-06T13:39:23Z</dc:date>
    </item>
  </channel>
</rss>

