<?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: Two conditions for Lookup in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Two-conditions-for-Lookup/m-p/534749#M151114</link>
    <description>&lt;P&gt;lookup command takes as many conditions as needed&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| lookup lookup_file id environment&lt;/LI-CODE&gt;&lt;P&gt;that means you have to provide environment as a constraint to the lookup - is that what you mean?&lt;/P&gt;&lt;P&gt;you example indicates you are trying to determine if the id is test or prod, but if it returns both, is that not a valid response? What are you intending to do with the answer to the lookup?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 05 Jan 2021 04:12:08 GMT</pubDate>
    <dc:creator>bowesmana</dc:creator>
    <dc:date>2021-01-05T04:12:08Z</dc:date>
    <item>
      <title>Two conditions for Lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Two-conditions-for-Lookup/m-p/534710#M151105</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;iam stuck with a problem where i need help from you guys. I have a search that runs IDs against a lookup to determine if that ID is from Production or Test Environment. Problem is: some IDs are double, means they exist in Prod and in Test. So when I search and hit one of those IDs they count against Prod and against Test. So i wanted to filter for two conditions that must be met - First would be the specific ID and second would be the environment. I cant get that to work, is there any way to select two conditions that must be met before the lookup give back an result?&lt;/P&gt;&lt;P&gt;I appreciate any feedback &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jan 2021 15:18:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Two-conditions-for-Lookup/m-p/534710#M151105</guid>
      <dc:creator>DanielAmlung</dc:creator>
      <dc:date>2021-01-04T15:18:36Z</dc:date>
    </item>
    <item>
      <title>Re: Two conditions for Lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Two-conditions-for-Lookup/m-p/534749#M151114</link>
      <description>&lt;P&gt;lookup command takes as many conditions as needed&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| lookup lookup_file id environment&lt;/LI-CODE&gt;&lt;P&gt;that means you have to provide environment as a constraint to the lookup - is that what you mean?&lt;/P&gt;&lt;P&gt;you example indicates you are trying to determine if the id is test or prod, but if it returns both, is that not a valid response? What are you intending to do with the answer to the lookup?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jan 2021 04:12:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Two-conditions-for-Lookup/m-p/534749#M151114</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2021-01-05T04:12:08Z</dc:date>
    </item>
    <item>
      <title>Re: Two conditions for Lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Two-conditions-for-Lookup/m-p/534759#M151119</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="lia-message-body lia-component-message-view-widget-body lia-component-body-signature-highlight-escalation lia-component-message-view-widget-body-signature-highlight-escalation"&gt;&lt;DIV class="lia-message-body-content"&gt;&lt;P&gt;Hi, thats what i tried. But then i get a multi value field "environment" back which contains both prod and test. I could split that into two fields, but in the summary its wrong because than i have 6 prod events insted of 3.&lt;/P&gt;&lt;P&gt;Idea behind this is: we have a system that calls for specific functions. Every call is tied to an ID, but since they also test the system it can happen that this id is valid both in prod and test. So when i create a search that queries only for calls from a specific id within the prod environment, i get douple results.&amp;nbsp; Because the id is both found in prod and test. So i wanted to filter for two conditions first one would be the id and second one would be the environment. But that need to happen within the lookup statement and not after wards.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;Example search with mvexpand:&lt;/U&gt;&lt;/P&gt;&lt;P&gt;index=XX&amp;nbsp; sourcetype=iis&lt;/P&gt;&lt;P&gt;NOT cs_User_Agent=performanceTester cs_uri_stem="*datapoints*values/*"&amp;nbsp;&lt;/P&gt;&lt;P&gt;| search XXid=XX475&amp;nbsp;&lt;/P&gt;&lt;P&gt;| lookup local=true lkp_XX_ids_kv XXId AS xx_id&amp;nbsp; OUTPUTNEW SourceSystemName as source_system Environment&lt;/P&gt;&lt;P&gt;| mvexpand Environment&lt;/P&gt;&lt;P&gt;|search Prod&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 05 Jan 2021 07:48:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Two-conditions-for-Lookup/m-p/534759#M151119</guid>
      <dc:creator>DanielAmlung</dc:creator>
      <dc:date>2021-01-05T07:48:57Z</dc:date>
    </item>
    <item>
      <title>Re: Two conditions for Lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Two-conditions-for-Lookup/m-p/537605#M152000</link>
      <description>&lt;P&gt;Fixed it&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/close&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jan 2021 12:00:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Two-conditions-for-Lookup/m-p/537605#M152000</guid>
      <dc:creator>DanielAmlung</dc:creator>
      <dc:date>2021-01-28T12:00:13Z</dc:date>
    </item>
  </channel>
</rss>

