<?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 Field manipulation using SED in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Field-manipulation-using-SED/m-p/232683#M69042</link>
    <description>&lt;P&gt;I am testing using Splunk to index a minecraft server, but have some problem with user name.&lt;BR /&gt;
Lines look like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Fri Mar 04 22:24:58 CET 2016 action=block_broken player=§4BirksX§r world=world x=30.0 y=105.0 z=-281.0 game_time=8303 block_type=LONG_GRAS
Fri Mar 04 22:24:58 CET 2016 action=block_broken player=Pardur1 world=world x=30.0 y=105.0 z=-281.0 game_time=8303 block_type=LONG_GRAS
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Since field names do confirm to some=data they are automatically extracted.&lt;BR /&gt;
For some reason some user has §4 in front of name and §r after it.&lt;/P&gt;

&lt;P&gt;I have temporary solved this by using SED like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source=minecraft | rex mode=sed field=player "s/(§4|§r)//g" | top player
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This works fine.&lt;BR /&gt;
But I would like to remove the data from the indexed data, so I tried this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;props.conf
[minecraft]
SED-remove_data = "s/(§4|§r)//g"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;props.conf
[minecraft]
SED-remove_data = s/(§4|§r)//g
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But none of them works.&lt;BR /&gt;
What do I do wrong?&lt;/P&gt;</description>
    <pubDate>Fri, 04 Mar 2016 22:43:28 GMT</pubDate>
    <dc:creator>lakromani</dc:creator>
    <dc:date>2016-03-04T22:43:28Z</dc:date>
    <item>
      <title>Field manipulation using SED</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-manipulation-using-SED/m-p/232683#M69042</link>
      <description>&lt;P&gt;I am testing using Splunk to index a minecraft server, but have some problem with user name.&lt;BR /&gt;
Lines look like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Fri Mar 04 22:24:58 CET 2016 action=block_broken player=§4BirksX§r world=world x=30.0 y=105.0 z=-281.0 game_time=8303 block_type=LONG_GRAS
Fri Mar 04 22:24:58 CET 2016 action=block_broken player=Pardur1 world=world x=30.0 y=105.0 z=-281.0 game_time=8303 block_type=LONG_GRAS
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Since field names do confirm to some=data they are automatically extracted.&lt;BR /&gt;
For some reason some user has §4 in front of name and §r after it.&lt;/P&gt;

&lt;P&gt;I have temporary solved this by using SED like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source=minecraft | rex mode=sed field=player "s/(§4|§r)//g" | top player
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This works fine.&lt;BR /&gt;
But I would like to remove the data from the indexed data, so I tried this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;props.conf
[minecraft]
SED-remove_data = "s/(§4|§r)//g"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;props.conf
[minecraft]
SED-remove_data = s/(§4|§r)//g
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But none of them works.&lt;BR /&gt;
What do I do wrong?&lt;/P&gt;</description>
      <pubDate>Fri, 04 Mar 2016 22:43:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-manipulation-using-SED/m-p/232683#M69042</guid>
      <dc:creator>lakromani</dc:creator>
      <dc:date>2016-03-04T22:43:28Z</dc:date>
    </item>
    <item>
      <title>Re: Field manipulation using SED</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-manipulation-using-SED/m-p/232684#M69043</link>
      <description>&lt;P&gt;The correct attribute name is &lt;CODE&gt;SEDCMD&lt;/CODE&gt; in props.conf. &lt;/P&gt;

&lt;P&gt;Also, hope you're adding this props.conf on heavy forwarder/indexer&lt;/P&gt;</description>
      <pubDate>Fri, 04 Mar 2016 23:10:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-manipulation-using-SED/m-p/232684#M69043</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-03-04T23:10:27Z</dc:date>
    </item>
    <item>
      <title>Re: Field manipulation using SED</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-manipulation-using-SED/m-p/232685#M69044</link>
      <description>&lt;P&gt;Will test it out.&lt;BR /&gt;
I do only have one Splunk server, no forwarder.&lt;/P&gt;

&lt;P&gt;Edit.&lt;BR /&gt;
Dit not work on my server.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[minecraft]
SEDCMD-remove_data = "s/(§4|§r)//g"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Edit2.&lt;BR /&gt;
It seem to be that the &lt;CODE&gt;§&lt;/CODE&gt; symbol messes things up.&lt;BR /&gt;
After removing the &lt;CODE&gt;"&lt;/CODE&gt; in &lt;CODE&gt;SEDCMD&lt;/CODE&gt; command, it has no more &lt;CODE&gt;player&lt;/CODE&gt;, but changed it to &lt;CODE&gt;playe&lt;/CODE&gt; and have removed the &lt;CODE&gt;4&lt;/CODE&gt; from the time, so it get like this:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;playe=§BirksX§r&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;I can see in nano that the &lt;CODE&gt;§&lt;/CODE&gt; shows like a strange character, but ok using &lt;CODE&gt;cat&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Sat, 05 Mar 2016 00:00:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-manipulation-using-SED/m-p/232685#M69044</guid>
      <dc:creator>lakromani</dc:creator>
      <dc:date>2016-03-05T00:00:58Z</dc:date>
    </item>
    <item>
      <title>Re: Field manipulation using SED</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-manipulation-using-SED/m-p/232686#M69045</link>
      <description>&lt;P&gt;Problem was the &lt;CODE&gt;ASCII code 245 = § ( Section sign )&lt;/CODE&gt; and I need to use &lt;CODE&gt;SEDCMD&lt;/CODE&gt; and not &lt;CODE&gt;SED&lt;/CODE&gt;&lt;BR /&gt;
After some sleep and some more googling, I found how to remove it, like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[minecraft]
SEDCMD-remove_data = s/\xa7\(r\|4\)//g
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 05 Mar 2016 08:08:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-manipulation-using-SED/m-p/232686#M69045</guid>
      <dc:creator>lakromani</dc:creator>
      <dc:date>2016-03-05T08:08:23Z</dc:date>
    </item>
  </channel>
</rss>

