<?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 to prevent duplicates in KV Store? in Knowledge Management</title>
    <link>https://community.splunk.com/t5/Knowledge-Management/How-to-prevent-duplicates-in-KV-Store/m-p/268478#M2368</link>
    <description>&lt;P&gt;Hi @dteo827,&lt;/P&gt;

&lt;P&gt;Do use  &lt;CODE&gt;dedup&lt;/CODE&gt; command while updating the lookup. To make sure that your lookup don't have duplicate values at any point of time set key (primary key, which can not be duplicated) in kvstore (&lt;A href="http://dev.splunk.com/view/webframework-developapps/SP-CAAAEZH"&gt;Reference&lt;/A&gt;).&lt;/P&gt;</description>
    <pubDate>Wed, 24 Apr 2019 12:55:27 GMT</pubDate>
    <dc:creator>VatsalJagani</dc:creator>
    <dc:date>2019-04-24T12:55:27Z</dc:date>
    <item>
      <title>How to prevent duplicates in KV Store?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/How-to-prevent-duplicates-in-KV-Store/m-p/268475#M2365</link>
      <description>&lt;P&gt;Greetings, &lt;BR /&gt;
I regularly update a KV Store with new IP addresses/websites to monitor for in my network traffic.&lt;/P&gt;

&lt;P&gt;Sometimes I get redundant information, and put in the same IP's/website multiple times.&lt;/P&gt;

&lt;P&gt;How can I prevent duplicates in the KV Store?&lt;/P&gt;</description>
      <pubDate>Wed, 09 Dec 2015 17:02:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/How-to-prevent-duplicates-in-KV-Store/m-p/268475#M2365</guid>
      <dc:creator>dteo827</dc:creator>
      <dc:date>2015-12-09T17:02:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to prevent duplicates in KV Store?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/How-to-prevent-duplicates-in-KV-Store/m-p/268476#M2366</link>
      <description>&lt;P&gt;If you are populating kv store with a search, then you can check the existence of IP's and store only those which are not inside, something like&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;your search terms&amp;gt;|inputlookup lookup_name where NOT [|inputlookup lookup_name where IP="*"|fields IP]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 14 Dec 2015 04:33:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/How-to-prevent-duplicates-in-KV-Store/m-p/268476#M2366</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2015-12-14T04:33:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to prevent duplicates in KV Store?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/How-to-prevent-duplicates-in-KV-Store/m-p/268477#M2367</link>
      <description>&lt;P&gt;Inputlookup has to be the first command of a search &lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2019 11:21:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/How-to-prevent-duplicates-in-KV-Store/m-p/268477#M2367</guid>
      <dc:creator>christoffertoft</dc:creator>
      <dc:date>2019-04-24T11:21:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to prevent duplicates in KV Store?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/How-to-prevent-duplicates-in-KV-Store/m-p/268478#M2368</link>
      <description>&lt;P&gt;Hi @dteo827,&lt;/P&gt;

&lt;P&gt;Do use  &lt;CODE&gt;dedup&lt;/CODE&gt; command while updating the lookup. To make sure that your lookup don't have duplicate values at any point of time set key (primary key, which can not be duplicated) in kvstore (&lt;A href="http://dev.splunk.com/view/webframework-developapps/SP-CAAAEZH"&gt;Reference&lt;/A&gt;).&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2019 12:55:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/How-to-prevent-duplicates-in-KV-Store/m-p/268478#M2368</guid>
      <dc:creator>VatsalJagani</dc:creator>
      <dc:date>2019-04-24T12:55:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to prevent duplicates in KV Store?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/How-to-prevent-duplicates-in-KV-Store/m-p/268479#M2369</link>
      <description>&lt;P&gt;This might work, but to play the devil's advocate here:&lt;/P&gt;

&lt;P&gt;Ponder that the list has  an IP and host of &lt;CODE&gt;example.com&lt;/CODE&gt;with ip &lt;CODE&gt;192.168.0.1&lt;/CODE&gt;&lt;BR /&gt;
At some point, that key-value expires (i.e is old), perhaps because the IP has changed.  At a later point in time, the ip &lt;CODE&gt;192.168.0.2&lt;/CODE&gt; resolves to &lt;CODE&gt;example.com&lt;/CODE&gt;,  which then should be put in the KV store. At this point, without using timestamps and additional logic,  you cant be certain the dedupped hostname (for example) removes the correct entry in the KV-store.&lt;/P&gt;

&lt;P&gt;I've had huge problems with the KV-store functionalities, where inputlookup is great in terms of providing data on a row by row basis, making it easy to discern duplicates etc, but has the requirement of being the first command in the pipe. lookup on the other hand can be anywhere in a search, but does not provide a way to separate colliding entries (i.e. the output will be similar to that of doing a &lt;CODE&gt;| stats values(*) by x&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2019 13:51:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/How-to-prevent-duplicates-in-KV-Store/m-p/268479#M2369</guid>
      <dc:creator>christoffertoft</dc:creator>
      <dc:date>2019-04-24T13:51:03Z</dc:date>
    </item>
  </channel>
</rss>

