<?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 can I remove additional field values? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-remove-additional-field-values/m-p/321287#M161840</link>
    <description>&lt;P&gt;Are you trying to replace it at search time or index time?&lt;/P&gt;

&lt;P&gt;This will remove it at search time &lt;BR /&gt;
&lt;CODE&gt;| rex mode=sed s/\d+\.\d+\.\d+\.\d+\S+/\d+\.\d+\.\d+\.\d+/g&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;This will remove it at index time&lt;BR /&gt;
 &lt;CODE&gt;SEDCMD-remove = ...&lt;/CODE&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 05 Apr 2018 15:25:36 GMT</pubDate>
    <dc:creator>skoelpin</dc:creator>
    <dc:date>2018-04-05T15:25:36Z</dc:date>
    <item>
      <title>How can I remove additional field values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-remove-additional-field-values/m-p/321286#M161839</link>
      <description>&lt;P&gt;I've tried several different ways to resolve this issue including using 'rex' and 'replace' but I can't seem to get it to work.&lt;/P&gt;

&lt;P&gt;The dst field on log results comes out as "192.168.1.1:1234:ABCD-A123"&lt;/P&gt;

&lt;P&gt;How can I just get the IP "192.168.1.1" and remove the other data?&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 05 Apr 2018 15:15:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-remove-additional-field-values/m-p/321286#M161839</guid>
      <dc:creator>chrisschum</dc:creator>
      <dc:date>2018-04-05T15:15:54Z</dc:date>
    </item>
    <item>
      <title>Re: How can I remove additional field values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-remove-additional-field-values/m-p/321287#M161840</link>
      <description>&lt;P&gt;Are you trying to replace it at search time or index time?&lt;/P&gt;

&lt;P&gt;This will remove it at search time &lt;BR /&gt;
&lt;CODE&gt;| rex mode=sed s/\d+\.\d+\.\d+\.\d+\S+/\d+\.\d+\.\d+\.\d+/g&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;This will remove it at index time&lt;BR /&gt;
 &lt;CODE&gt;SEDCMD-remove = ...&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Apr 2018 15:25:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-remove-additional-field-values/m-p/321287#M161840</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2018-04-05T15:25:36Z</dc:date>
    </item>
    <item>
      <title>Re: How can I remove additional field values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-remove-additional-field-values/m-p/321288#M161841</link>
      <description>&lt;P&gt;Use this REX to extract only IP from it.&lt;/P&gt;

&lt;P&gt;| rex field=_raw "(?P\d{0,3}.\d{0,3}.\d{0,3}.\d{0,3}):"&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 05 Apr 2018 16:31:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-remove-additional-field-values/m-p/321288#M161841</guid>
      <dc:creator>PowerPacked</dc:creator>
      <dc:date>2018-04-05T16:31:50Z</dc:date>
    </item>
    <item>
      <title>Re: How can I remove additional field values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-remove-additional-field-values/m-p/321289#M161842</link>
      <description>&lt;P&gt;This worked, thanks! And it was at search time.&lt;/P&gt;

&lt;P&gt;One additional question I failed to mention. How can I pass this removal to the additional part of my search below? This removal doesn't appear to change the 'dst' field value with the list command piece, if that makes sense.&lt;/P&gt;

&lt;P&gt;| stats count by dst, src | stats list(src), list(dst) by count &lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 05 Apr 2018 22:24:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-remove-additional-field-values/m-p/321289#M161842</guid>
      <dc:creator>chrisschum</dc:creator>
      <dc:date>2018-04-05T22:24:43Z</dc:date>
    </item>
    <item>
      <title>Re: How can I remove additional field values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-remove-additional-field-values/m-p/321290#M161843</link>
      <description>&lt;P&gt;Use this search&lt;/P&gt;

&lt;P&gt;Your search | rex field=dst "(?P\d{0,3}.\d{0,3}.\d{0,3}.\d{0,3}):" | stats count by IP_Only&lt;/P&gt;</description>
      <pubDate>Thu, 05 Apr 2018 23:01:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-remove-additional-field-values/m-p/321290#M161843</guid>
      <dc:creator>PowerPacked</dc:creator>
      <dc:date>2018-04-05T23:01:05Z</dc:date>
    </item>
    <item>
      <title>Re: How can I remove additional field values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-remove-additional-field-values/m-p/321291#M161844</link>
      <description>&lt;P&gt;It's giving me an error message:&lt;BR /&gt;
Error in 'rex' command: Encountered the following error while compiling the regex '(?P\d{0,3}.\d{0,3}.\d{0,3}.\d{0,3}):': Regex: unrecognized character after (?P&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 05 Apr 2018 23:16:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-remove-additional-field-values/m-p/321291#M161844</guid>
      <dc:creator>chrisschum</dc:creator>
      <dc:date>2018-04-05T23:16:30Z</dc:date>
    </item>
    <item>
      <title>Re: How can I remove additional field values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-remove-additional-field-values/m-p/321292#M161845</link>
      <description>&lt;P&gt;So what this is doing is it's finding a pattern and replacing it with just the IP. The rex mode=sed works like this &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;s/&amp;lt;Regex to find pattern&amp;gt;/&amp;lt;-Replace it with this pattern----&amp;gt;/g&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;So if you want to apply this to your dest field, you would have to pattern match it like the regex above. Or you can simply extract the the IP from that field and create a new field with it. Paste the pattern of your dest IP and source IP so I can see how they differ&lt;/P&gt;</description>
      <pubDate>Fri, 06 Apr 2018 00:10:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-remove-additional-field-values/m-p/321292#M161845</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2018-04-06T00:10:51Z</dc:date>
    </item>
    <item>
      <title>Re: How can I remove additional field values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-remove-additional-field-values/m-p/321293#M161846</link>
      <description>&lt;P&gt;Okay, that make sense, thanks!&lt;/P&gt;

&lt;P&gt;I'll mess around with it and should be able to come up with what I need based on the information you gave me.&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 06 Apr 2018 00:27:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-remove-additional-field-values/m-p/321293#M161846</guid>
      <dc:creator>chrisschum</dc:creator>
      <dc:date>2018-04-06T00:27:09Z</dc:date>
    </item>
    <item>
      <title>Re: How can I remove additional field values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-remove-additional-field-values/m-p/321294#M161847</link>
      <description>&lt;P&gt;Don't forget to accept the answer when this solves your problem! &lt;/P&gt;</description>
      <pubDate>Fri, 06 Apr 2018 00:45:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-remove-additional-field-values/m-p/321294#M161847</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2018-04-06T00:45:46Z</dc:date>
    </item>
  </channel>
</rss>

