<?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: Replace field during parsing in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-replace-field-during-parsing/m-p/653441#M110836</link>
    <description>&lt;P&gt;What if I want to replace all the values in a specific field (number 3) during ingestion with a fixed value for all rows?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 07 Aug 2023 16:15:16 GMT</pubDate>
    <dc:creator>antob</dc:creator>
    <dc:date>2023-08-07T16:15:16Z</dc:date>
    <item>
      <title>How to replace field during parsing?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-replace-field-during-parsing/m-p/628134#M107802</link>
      <description>&lt;P&gt;Hello everyone,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have logs like&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;2022-11-23 12:47:42.000 id="123" event="some text text2 text3   text4"&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to trim everything that goes after three consecutive spaces, so I want to get raw logs&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;2022-11-23 12:47:42.000 id="123" event="some text text2 text3"&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I did such props.conf&lt;/P&gt;
&lt;P&gt;[my_sourcetype]&lt;BR /&gt;...&lt;BR /&gt;EXTRACT-event = event="(?&amp;lt;event&amp;gt;.+?)\s{3,}.*"&lt;BR /&gt;...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's working fine, I get event field what I want, but I still get old logs with 3+ spaces.&lt;/P&gt;
&lt;P&gt;What should I add to props conf to get correct logs?&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2023 15:14:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-replace-field-during-parsing/m-p/628134#M107802</guid>
      <dc:creator>bosseres</dc:creator>
      <dc:date>2023-01-24T15:14:23Z</dc:date>
    </item>
    <item>
      <title>Re: Replace field during parsing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-replace-field-during-parsing/m-p/628136#M107803</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/228794"&gt;@bosseres&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;if you are speaking at search time, the same rules can be applied also to old events.&lt;/P&gt;&lt;P&gt;If you're speaking at index time, you can only apply rules to new indexed events not to already indexed events.&lt;/P&gt;&lt;P&gt;If you want to modify already indexed events, it isn't possible in Splunk.&lt;/P&gt;&lt;P&gt;As a workaround you could extract and reindex them, but it's a very hard work.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2023 13:23:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-replace-field-during-parsing/m-p/628136#M107803</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-01-24T13:23:59Z</dc:date>
    </item>
    <item>
      <title>Re: Replace field during parsing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-replace-field-during-parsing/m-p/628137#M107804</link>
      <description>&lt;P&gt;I want to replace/trim only new logs, that not indexed&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2023 13:25:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-replace-field-during-parsing/m-p/628137#M107804</guid>
      <dc:creator>bosseres</dc:creator>
      <dc:date>2023-01-24T13:25:03Z</dc:date>
    </item>
    <item>
      <title>Re: Replace field during parsing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-replace-field-during-parsing/m-p/628172#M107813</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/228794"&gt;@bosseres&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;if you're sure that in each event you have only one group of three spaces, you could try this command to insert in props.conf:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;SEDCMD-reduce_event = s/^.*\s\s\s.*/^.*\s\s\s/g&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2023 16:55:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-replace-field-during-parsing/m-p/628172#M107813</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-01-24T16:55:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to replace field during parsing?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-replace-field-during-parsing/m-p/628183#M107815</link>
      <description>&lt;P&gt;Splunk can work on events in two separate points.&lt;/P&gt;&lt;P&gt;One thing is the so-called index time processing. Which means that an event is being ingested from the source, some transforms are being applied, possibly rewriting some metadata (a relatively common use - to cast event to another sourcetype, or filter some events out completely by redirecting them to nullqueue), extracting indexed fields or trimming/rewriting raw data. Then event is written do the index and its _raw value is immutable from now on - you can't change it anymore.&lt;/P&gt;&lt;P&gt;With search-time operations you can extract some parts of the raw message as fields, calculate other fields based on those values and/or indexed fields and so on.&lt;/P&gt;&lt;P&gt;So if you define a search-time extraction (that's what the EXTRACT setting does), you can get your field value populated but the original _raw event still contains the event as it was when it was ingested and written to the index. If you want to trim the raw event value before writing it to the index, you have to use TRANSFORMS or SEDCMD.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2023 17:54:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-replace-field-during-parsing/m-p/628183#M107815</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2023-01-24T17:54:27Z</dc:date>
    </item>
    <item>
      <title>Re: Replace field during parsing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-replace-field-during-parsing/m-p/653441#M110836</link>
      <description>&lt;P&gt;What if I want to replace all the values in a specific field (number 3) during ingestion with a fixed value for all rows?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Aug 2023 16:15:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-replace-field-during-parsing/m-p/653441#M110836</guid>
      <dc:creator>antob</dc:creator>
      <dc:date>2023-08-07T16:15:16Z</dc:date>
    </item>
  </channel>
</rss>

