<?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: dedup only when values match in two fields in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/dedup-only-when-values-match-in-two-fields/m-p/102026#M26355</link>
    <description>&lt;P&gt;To find the version, from Splunkweb in the upper right, click About.&lt;/P&gt;</description>
    <pubDate>Wed, 16 Oct 2013 21:23:37 GMT</pubDate>
    <dc:creator>lukejadamec</dc:creator>
    <dc:date>2013-10-16T21:23:37Z</dc:date>
    <item>
      <title>dedup only when values match in two fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/dedup-only-when-values-match-in-two-fields/m-p/102019#M26348</link>
      <description>&lt;P&gt;Here's an interesting problem.  I need to write a query where Splunk removes an event when two specific values in a found event match.  For example, a mocked-up sample of my results shows this:&lt;/P&gt;

&lt;P&gt;0.0.0.0       test&lt;BR /&gt;
0.0.0.0       pass&lt;BR /&gt;
0.0.0.0       pass&lt;/P&gt;

&lt;P&gt;I'd like Splunk to only remove the second instance of "0.0.0.0    pass" while keeping the first instance as well as the "0.0.0.0     test" in my results.&lt;/P&gt;

&lt;P&gt;Is there an easy way to do this?  If it helps, the field name for the numbers is &lt;STRONG&gt;src&lt;/STRONG&gt; and for the words is &lt;STRONG&gt;cs5&lt;/STRONG&gt;.  Any help is appreciated.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Oct 2013 18:26:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/dedup-only-when-values-match-in-two-fields/m-p/102019#M26348</guid>
      <dc:creator>CharterBT</dc:creator>
      <dc:date>2013-10-16T18:26:35Z</dc:date>
    </item>
    <item>
      <title>Re: dedup only when values match in two fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/dedup-only-when-values-match-in-two-fields/m-p/102020#M26349</link>
      <description>&lt;P&gt;Dedup should be able to do this. If you post a little more of your end game, there maybe a more optimized approach. Do you want counts of how many times this happens? etc.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;your_search | dedup 2 src&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.0/SearchReference/Dedup" target="test_blank"&gt;http://docs.splunk.com/Documentation/Splunk/6.0/SearchReference/Dedup&lt;/A&gt;&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Oct 2013 18:43:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/dedup-only-when-values-match-in-two-fields/m-p/102020#M26349</guid>
      <dc:creator>alacercogitatus</dc:creator>
      <dc:date>2013-10-16T18:43:22Z</dc:date>
    </item>
    <item>
      <title>Re: dedup only when values match in two fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/dedup-only-when-values-match-in-two-fields/m-p/102021#M26350</link>
      <description>&lt;P&gt;No, I don't need to know how many times it repeats.  &lt;/P&gt;

&lt;P&gt;Each # value is a computer, and each word value is a type of malware.  Some computers have multiple infections, so I just need to remove the instances where that computer/malware combination has already been identified.  My search is covering a month-long timeframe, so I don't need to count every time it shows up, just that it did at some point. &lt;/P&gt;

&lt;P&gt;Does that help?&lt;/P&gt;</description>
      <pubDate>Wed, 16 Oct 2013 18:53:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/dedup-only-when-values-match-in-two-fields/m-p/102021#M26350</guid>
      <dc:creator>CharterBT</dc:creator>
      <dc:date>2013-10-16T18:53:08Z</dc:date>
    </item>
    <item>
      <title>Re: dedup only when values match in two fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/dedup-only-when-values-match-in-two-fields/m-p/102022#M26351</link>
      <description>&lt;P&gt;Then a better search is: &lt;CODE&gt;your_search | stats dc(cs5) as DistinctInfections by src&lt;/CODE&gt;. This gives you each individual source and how many different infections they have over the time range.  If you want how many of each infection per src, do &lt;CODE&gt;your_search | stats count by cs5 src&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Oct 2013 18:56:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/dedup-only-when-values-match-in-two-fields/m-p/102022#M26351</guid>
      <dc:creator>alacercogitatus</dc:creator>
      <dc:date>2013-10-16T18:56:04Z</dc:date>
    </item>
    <item>
      <title>Re: dedup only when values match in two fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/dedup-only-when-values-match-in-two-fields/m-p/102023#M26352</link>
      <description>&lt;P&gt;One other thing.  I tried "dedup src, cs5", but it didn't retain any new "src" records after it found its first duplicate src value.  I need the dedup to be a little smarter and only remove duplicate entries of the src/cs5 combination.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Oct 2013 19:01:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/dedup-only-when-values-match-in-two-fields/m-p/102023#M26352</guid>
      <dc:creator>CharterBT</dc:creator>
      <dc:date>2013-10-16T19:01:43Z</dc:date>
    </item>
    <item>
      <title>Re: dedup only when values match in two fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/dedup-only-when-values-match-in-two-fields/m-p/102024#M26353</link>
      <description>&lt;P&gt;Thats where &lt;CODE&gt;stats count by cs5 src&lt;/CODE&gt; works a little faster. stats is done at the indexer, dedup is done at the search head. &lt;CODE&gt;dedup src cs5&lt;/CODE&gt; should be doing the same thing according to the docs. what version are you using?&lt;/P&gt;</description>
      <pubDate>Wed, 16 Oct 2013 19:04:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/dedup-only-when-values-match-in-two-fields/m-p/102024#M26353</guid>
      <dc:creator>alacercogitatus</dc:creator>
      <dc:date>2013-10-16T19:04:57Z</dc:date>
    </item>
    <item>
      <title>Re: dedup only when values match in two fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/dedup-only-when-values-match-in-two-fields/m-p/102025#M26354</link>
      <description>&lt;P&gt;Not sure the version... but it's not 6, yet.  Thanks for the tips.  I'll try them and let you know how it goes.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Oct 2013 21:08:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/dedup-only-when-values-match-in-two-fields/m-p/102025#M26354</guid>
      <dc:creator>CharterBT</dc:creator>
      <dc:date>2013-10-16T21:08:50Z</dc:date>
    </item>
    <item>
      <title>Re: dedup only when values match in two fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/dedup-only-when-values-match-in-two-fields/m-p/102026#M26355</link>
      <description>&lt;P&gt;To find the version, from Splunkweb in the upper right, click About.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Oct 2013 21:23:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/dedup-only-when-values-match-in-two-fields/m-p/102026#M26355</guid>
      <dc:creator>lukejadamec</dc:creator>
      <dc:date>2013-10-16T21:23:37Z</dc:date>
    </item>
  </channel>
</rss>

