<?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: lookup username from seperate search in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/lookup-username-from-seperate-search/m-p/65624#M16300</link>
    <description>&lt;P&gt;You can probably do this by a subsearch if you just want to find a mapped paths, drive letter etc from a single user, but it's a bit hard to say since you don't give all that much information of your desired output or sample logs.&lt;/P&gt;

&lt;P&gt;Otherwise you might have to resort to a &lt;CODE&gt;join&lt;/CODE&gt;, which is rather expensive.&lt;/P&gt;

&lt;P&gt;The join approach would give you something like&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=A | join COMPUTERNAME [search sourcetype=B | fields COMPUTERNAME, USER_NAME] | table USER_NAME, COMPUTERNAME, DRIVELETTER, PATH
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;More information would allow you to get better help.&lt;/P&gt;

&lt;P&gt;/Kristian&lt;/P&gt;</description>
    <pubDate>Mon, 06 Feb 2012 19:18:36 GMT</pubDate>
    <dc:creator>kristian_kolb</dc:creator>
    <dc:date>2012-02-06T19:18:36Z</dc:date>
    <item>
      <title>lookup username from seperate search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/lookup-username-from-seperate-search/m-p/65622#M16298</link>
      <description>&lt;P&gt;I am performing a search on some data that contains the computername, drive letter, and path of drives mapped to the computer.  I also have a second search that returns the username associated with the computer.  How can I add a field to the first search that ties the computername in search 1 to the username in search 2.  Can I do this with a eval/subsearch or by doing a lookup to a csv file?&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Feb 2012 16:46:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/lookup-username-from-seperate-search/m-p/65622#M16298</guid>
      <dc:creator>justinhart</dc:creator>
      <dc:date>2012-02-06T16:46:33Z</dc:date>
    </item>
    <item>
      <title>Re: lookup username from seperate search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/lookup-username-from-seperate-search/m-p/65623#M16299</link>
      <description>&lt;P&gt;I think a subsearch would do the trick if you need to look up the username/computername data dynamically.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=&amp;lt;src-1&amp;gt; computername=* 
[source=&amp;lt;src-2&amp;gt; computername=* | fields username ] 
| stats values(username)....by computername
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But if you had a list of computernames and usernames available as a CSV you could do a lookup table as well at the end.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=* | stats values(computername) AS computername | lookup user_table computername OUTPUT username AS "User"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 06 Feb 2012 19:12:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/lookup-username-from-seperate-search/m-p/65623#M16299</guid>
      <dc:creator>Kate_Lawrence-G</dc:creator>
      <dc:date>2012-02-06T19:12:14Z</dc:date>
    </item>
    <item>
      <title>Re: lookup username from seperate search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/lookup-username-from-seperate-search/m-p/65624#M16300</link>
      <description>&lt;P&gt;You can probably do this by a subsearch if you just want to find a mapped paths, drive letter etc from a single user, but it's a bit hard to say since you don't give all that much information of your desired output or sample logs.&lt;/P&gt;

&lt;P&gt;Otherwise you might have to resort to a &lt;CODE&gt;join&lt;/CODE&gt;, which is rather expensive.&lt;/P&gt;

&lt;P&gt;The join approach would give you something like&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=A | join COMPUTERNAME [search sourcetype=B | fields COMPUTERNAME, USER_NAME] | table USER_NAME, COMPUTERNAME, DRIVELETTER, PATH
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;More information would allow you to get better help.&lt;/P&gt;

&lt;P&gt;/Kristian&lt;/P&gt;</description>
      <pubDate>Mon, 06 Feb 2012 19:18:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/lookup-username-from-seperate-search/m-p/65624#M16300</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2012-02-06T19:18:36Z</dc:date>
    </item>
    <item>
      <title>Re: lookup username from seperate search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/lookup-username-from-seperate-search/m-p/65625#M16301</link>
      <description>&lt;P&gt;Thanks, this seemed like the easiest way to get what I was wanting.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Feb 2012 20:35:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/lookup-username-from-seperate-search/m-p/65625#M16301</guid>
      <dc:creator>justinhart</dc:creator>
      <dc:date>2012-02-06T20:35:24Z</dc:date>
    </item>
  </channel>
</rss>

