<?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: Does Value Exist in KV Store in Splunk Enterprise Security</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Does-Value-Exist-in-KV-Store/m-p/451032#M6264</link>
    <description>&lt;P&gt;Automatic lookup might help you. But you need to define it for the list of sourcetypes used by the particular datamodel.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Reference:&lt;/STRONG&gt;&lt;BR /&gt;
&lt;A href="https://docs.splunk.com/Documentation/Splunk/7.3.1/Knowledge/Makeyourlookupautomatic"&gt;https://docs.splunk.com/Documentation/Splunk/7.3.1/Knowledge/Makeyourlookupautomatic&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 15 Aug 2019 01:24:10 GMT</pubDate>
    <dc:creator>jawaharas</dc:creator>
    <dc:date>2019-08-15T01:24:10Z</dc:date>
    <item>
      <title>Does Value Exist in KV Store</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Does-Value-Exist-in-KV-Store/m-p/451029#M6261</link>
      <description>&lt;P&gt;Hi All,&lt;BR /&gt;
Sorry, this might be an obvious one but I'm having trouble finding information on this specific problem.&lt;/P&gt;

&lt;P&gt;I have a KV store named 'critical-servers' which contains a list of host name. In my data model I want to create a boolean value 'critical' which is assigned a value of True if the host who produced the event exists in the kvstore.&lt;/P&gt;

&lt;P&gt;I seem to only be able to find examples of extracting values from the KVStore and not seeing if a value exists in the list.&lt;/P&gt;

&lt;P&gt;Thanks in advance.&lt;BR /&gt;
S.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2019 00:20:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Does-Value-Exist-in-KV-Store/m-p/451029#M6261</guid>
      <dc:creator>shayvdee</dc:creator>
      <dc:date>2019-08-15T00:20:00Z</dc:date>
    </item>
    <item>
      <title>Re: Does Value Exist in KV Store</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Does-Value-Exist-in-KV-Store/m-p/451030#M6262</link>
      <description>&lt;P&gt;I hope you trying to create the field 'critical' in an Splunk query. (Just confused with the word '&lt;EM&gt;data model&lt;/EM&gt;' in this context).&lt;/P&gt;

&lt;P&gt;Assuming '&lt;EM&gt;server_name&lt;/EM&gt;' is the field name in your search and kvstore.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;KVStore&lt;/STRONG&gt; works mostly like a lookup table. You can use below SPL for your usecase. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| [BASE SEARCH]
| eval server_name="server1"
| lookup critical-servers server_name OUTPUT server_name as server_name_from_kvstore
| eval critical_server=if(isnotnull(server_name_from_kvstore),"Yes","No")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 15 Aug 2019 00:36:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Does-Value-Exist-in-KV-Store/m-p/451030#M6262</guid>
      <dc:creator>jawaharas</dc:creator>
      <dc:date>2019-08-15T00:36:10Z</dc:date>
    </item>
    <item>
      <title>Re: Does Value Exist in KV Store</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Does-Value-Exist-in-KV-Store/m-p/451031#M6263</link>
      <description>&lt;P&gt;I have a data model running where one of the extracted fields is 'host'. &lt;/P&gt;

&lt;P&gt;I am wanting to add another field to the datamodel which is an Eval Expression. I want the eval to check the list of server names in the KVStore for a match of the 'host' field.&lt;/P&gt;

&lt;P&gt;As a result I can query the datamodel in other searches by doing:&lt;BR /&gt;
WHERE datamodel.server.critical=true&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2019 00:51:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Does-Value-Exist-in-KV-Store/m-p/451031#M6263</guid>
      <dc:creator>shayvdee</dc:creator>
      <dc:date>2019-08-15T00:51:50Z</dc:date>
    </item>
    <item>
      <title>Re: Does Value Exist in KV Store</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Does-Value-Exist-in-KV-Store/m-p/451032#M6264</link>
      <description>&lt;P&gt;Automatic lookup might help you. But you need to define it for the list of sourcetypes used by the particular datamodel.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Reference:&lt;/STRONG&gt;&lt;BR /&gt;
&lt;A href="https://docs.splunk.com/Documentation/Splunk/7.3.1/Knowledge/Makeyourlookupautomatic"&gt;https://docs.splunk.com/Documentation/Splunk/7.3.1/Knowledge/Makeyourlookupautomatic&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2019 01:24:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Does-Value-Exist-in-KV-Store/m-p/451032#M6264</guid>
      <dc:creator>jawaharas</dc:creator>
      <dc:date>2019-08-15T01:24:10Z</dc:date>
    </item>
    <item>
      <title>Re: Does Value Exist in KV Store</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Does-Value-Exist-in-KV-Store/m-p/451033#M6265</link>
      <description>&lt;P&gt;Create a &lt;CODE&gt;Lookup Definition&lt;/CODE&gt; against your KVStore called something like &lt;CODE&gt;my_lookup_definition&lt;/CODE&gt;.&lt;BR /&gt;
Then create an &lt;CODE&gt;Automatic Lookup&lt;/CODE&gt; to do this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | lookupmy_lookup_definition &amp;lt;Server Field Name In Lookup&amp;gt; &amp;lt;Server Field Name In Data&amp;gt; OUTPUT &amp;lt;Server Field Name In Lookup&amp;gt; AS _critical_temp
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then create a &lt;CODE&gt;Calculated Field&lt;/CODE&gt; like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | eval critical=if(isnull(_critical_temp),"False", "True")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;OR Better yet, eliminate the need for a &lt;CODE&gt;Calculated Field&lt;/CODE&gt; entirely by configuring your KVStore to have a field called &lt;CODE&gt;critical&lt;/CODE&gt; with every row having a value of &lt;CODE&gt;True&lt;/CODE&gt; and then in your &lt;CODE&gt;Lookup Definition&lt;/CODE&gt; set a default value of &lt;CODE&gt;False&lt;/CODE&gt; and make your &lt;CODE&gt;Automatic Lookup&lt;/CODE&gt; like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | lookupmy_lookup_definition &amp;lt;Server Field Name In Lookup&amp;gt; &amp;lt;Server Field Name In Data&amp;gt; OUTPUT critical
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 15 Aug 2019 17:27:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Does-Value-Exist-in-KV-Store/m-p/451033#M6265</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-08-15T17:27:32Z</dc:date>
    </item>
  </channel>
</rss>

