<?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 How to search a lookup based on field values of a base search in Security</title>
    <link>https://community.splunk.com/t5/Security/How-to-search-a-lookup-based-on-field-values-of-a-base-search/m-p/585010#M15909</link>
    <description>&lt;P&gt;Hello everyone, hope you are all well this afternoon.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;I am trying to combine 2 searches where the outer search passes a value to the inner search and then appends the results. Let me explain:&lt;BR /&gt;&lt;BR /&gt;As of right now, I am searching a set of logs that happens to include people's names and their request type when they call the bank. The one I am focused on is "withdraw inquiry." So we get a list of all people who try to withdraw money based on the following&amp;nbsp; base search.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;index=myIndex sourcetype=mySource request_type="withdraw inquiry"
| xmlkv DetailXML
| stats count, values(phone_number), values(activity_summary), values(request_type) values(email) by acct_num name_last name_first
| where count &amp;gt; 1
| sort - count&lt;/LI-CODE&gt;
&lt;P&gt;I have made this into a dash board and then subsequently added a drilldown. You click the panel and it then searches a lookup table called Previously_Compromised_Accounts.csv&lt;/P&gt;
&lt;P&gt;That search is this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;| inputlookup Previously_Compromised_Accounts.csv
| search name=*$clickValue$*
| table date user &lt;/LI-CODE&gt;
&lt;P&gt;How can I combine this search? Basically, I would like to add another column "compromisedUser" to the base search. If the base search is ran, then a secondary search would be performed, using the value of "name_last" and search the lookup table, which then appends the results to the base search as "compromisedUser"&lt;/P&gt;
&lt;P&gt;if no results come from the search of the&amp;nbsp;Previously_Compromised_Accounts.csv, then that 8th coloumn can remain blank.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="12.5%" height="47px"&gt;accountNumber&lt;/TD&gt;
&lt;TD width="12.5%" height="47px"&gt;name_first&lt;/TD&gt;
&lt;TD width="12.5%" height="47px"&gt;name_last&lt;/TD&gt;
&lt;TD width="12.5%" height="47px"&gt;call count&lt;/TD&gt;
&lt;TD width="12.5%" height="47px"&gt;values(phone_number)&lt;/TD&gt;
&lt;TD width="12.5%" height="47px"&gt;values(activity_summary)&lt;/TD&gt;
&lt;TD width="12.5%" height="47px"&gt;values(email)&lt;/TD&gt;
&lt;TD width="12.5%" height="47px"&gt;compromisedUser&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD height="25px"&gt;123456678&lt;/TD&gt;
&lt;TD height="25px"&gt;Smith&lt;/TD&gt;
&lt;TD height="25px"&gt;John&lt;/TD&gt;
&lt;TD height="25px"&gt;3&lt;/TD&gt;
&lt;TD height="25px"&gt;1235550987&lt;/TD&gt;
&lt;TD height="25px"&gt;withdraw inquiry&lt;/TD&gt;
&lt;TD height="25px"&gt;JohnSmith@company.com&lt;/TD&gt;
&lt;TD height="25px"&gt;26DEC2021&lt;BR /&gt;jsmith001&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
    <pubDate>Mon, 14 Feb 2022 17:37:51 GMT</pubDate>
    <dc:creator>Allene139</dc:creator>
    <dc:date>2022-02-14T17:37:51Z</dc:date>
    <item>
      <title>How to search a lookup based on field values of a base search</title>
      <link>https://community.splunk.com/t5/Security/How-to-search-a-lookup-based-on-field-values-of-a-base-search/m-p/585010#M15909</link>
      <description>&lt;P&gt;Hello everyone, hope you are all well this afternoon.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;I am trying to combine 2 searches where the outer search passes a value to the inner search and then appends the results. Let me explain:&lt;BR /&gt;&lt;BR /&gt;As of right now, I am searching a set of logs that happens to include people's names and their request type when they call the bank. The one I am focused on is "withdraw inquiry." So we get a list of all people who try to withdraw money based on the following&amp;nbsp; base search.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;index=myIndex sourcetype=mySource request_type="withdraw inquiry"
| xmlkv DetailXML
| stats count, values(phone_number), values(activity_summary), values(request_type) values(email) by acct_num name_last name_first
| where count &amp;gt; 1
| sort - count&lt;/LI-CODE&gt;
&lt;P&gt;I have made this into a dash board and then subsequently added a drilldown. You click the panel and it then searches a lookup table called Previously_Compromised_Accounts.csv&lt;/P&gt;
&lt;P&gt;That search is this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;| inputlookup Previously_Compromised_Accounts.csv
| search name=*$clickValue$*
| table date user &lt;/LI-CODE&gt;
&lt;P&gt;How can I combine this search? Basically, I would like to add another column "compromisedUser" to the base search. If the base search is ran, then a secondary search would be performed, using the value of "name_last" and search the lookup table, which then appends the results to the base search as "compromisedUser"&lt;/P&gt;
&lt;P&gt;if no results come from the search of the&amp;nbsp;Previously_Compromised_Accounts.csv, then that 8th coloumn can remain blank.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="12.5%" height="47px"&gt;accountNumber&lt;/TD&gt;
&lt;TD width="12.5%" height="47px"&gt;name_first&lt;/TD&gt;
&lt;TD width="12.5%" height="47px"&gt;name_last&lt;/TD&gt;
&lt;TD width="12.5%" height="47px"&gt;call count&lt;/TD&gt;
&lt;TD width="12.5%" height="47px"&gt;values(phone_number)&lt;/TD&gt;
&lt;TD width="12.5%" height="47px"&gt;values(activity_summary)&lt;/TD&gt;
&lt;TD width="12.5%" height="47px"&gt;values(email)&lt;/TD&gt;
&lt;TD width="12.5%" height="47px"&gt;compromisedUser&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD height="25px"&gt;123456678&lt;/TD&gt;
&lt;TD height="25px"&gt;Smith&lt;/TD&gt;
&lt;TD height="25px"&gt;John&lt;/TD&gt;
&lt;TD height="25px"&gt;3&lt;/TD&gt;
&lt;TD height="25px"&gt;1235550987&lt;/TD&gt;
&lt;TD height="25px"&gt;withdraw inquiry&lt;/TD&gt;
&lt;TD height="25px"&gt;JohnSmith@company.com&lt;/TD&gt;
&lt;TD height="25px"&gt;26DEC2021&lt;BR /&gt;jsmith001&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
      <pubDate>Mon, 14 Feb 2022 17:37:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/How-to-search-a-lookup-based-on-field-values-of-a-base-search/m-p/585010#M15909</guid>
      <dc:creator>Allene139</dc:creator>
      <dc:date>2022-02-14T17:37:51Z</dc:date>
    </item>
    <item>
      <title>Re: Search a lookup based on field values of a base search</title>
      <link>https://community.splunk.com/t5/Security/How-to-search-a-lookup-based-on-field-values-of-a-base-search/m-p/585011#M15910</link>
      <description>&lt;P&gt;You can use the lookup command to check the CSV file and add a column to the table.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=myIndex sourcetype=mySource request_type="withdraw inquiry"
| xmlkv DetailXML
| stats count, values(phone_number) as phone_number, values(activity_summary) as activity_summary, values(request_type) as request_type values(email) as email by acct_num name_last name_first
| where count &amp;gt; 1
| sort - count
| lookup Previously_Compromised_Accounts.csv name as name_last
| eval compromisedUser = date . " " . user
| table acct_num name_first name_last count phone_number activity_summary email compromisedUser&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 14 Feb 2022 17:36:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/How-to-search-a-lookup-based-on-field-values-of-a-base-search/m-p/585011#M15910</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-02-14T17:36:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to search a lookup based on field values of a base search</title>
      <link>https://community.splunk.com/t5/Security/How-to-search-a-lookup-based-on-field-values-of-a-base-search/m-p/585018#M15911</link>
      <description>&lt;P&gt;Hey rich thanks so much, that was very helpful. Unfortunately, the column compromisedUser is blank. I think the problem is that the lookup command might be looking for an exact match.&lt;/P&gt;&lt;P&gt;Notice how the last name is Smith in the previous example, however, his username (AKA user) is jsmith001. So really, I would like to search the user field of Previously_Compromised_Accounts.csv for a string that contains "smith," and it would return&amp;nbsp;jsmith001 and its date of compromise.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Feb 2022 21:37:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/How-to-search-a-lookup-based-on-field-values-of-a-base-search/m-p/585018#M15911</guid>
      <dc:creator>Allene139</dc:creator>
      <dc:date>2022-02-14T21:37:46Z</dc:date>
    </item>
  </channel>
</rss>

