<?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: subsearch question in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/subsearch-question/m-p/181686#M52358</link>
    <description>&lt;P&gt;Hi Phynyte,&lt;/P&gt;

&lt;P&gt;this is un-tested, but you can try something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=security "An account was successfully logged on." [ search index=randomlogs host=useraccountlist | rename UsrAcctName AS Account_Name | return Account_Name ]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;_time will be returned from your events from the outer search.&lt;/P&gt;

&lt;P&gt;hope this helps ...&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
    <pubDate>Tue, 11 Mar 2014 15:09:57 GMT</pubDate>
    <dc:creator>MuS</dc:creator>
    <dc:date>2014-03-11T15:09:57Z</dc:date>
    <item>
      <title>subsearch question</title>
      <link>https://community.splunk.com/t5/Splunk-Search/subsearch-question/m-p/181685#M52357</link>
      <description>&lt;P&gt;I'm trying to pull a list of the last time User Accounts logged. The part I need help on is the following.I'm looking for a finite list of User Accounts. This list is pulled from a csv file that was loaded.&lt;/P&gt;

&lt;P&gt;Then from that list I'm looking at all of the successful logons from an index and I just want the time/User Account of the last logon from that user.&lt;/P&gt;

&lt;P&gt;index=security "An account was successfully logged on." [search index=randomlogs host=useraccountlist | table UsrAcctName | fields + UsrAcctName]&lt;/P&gt;

&lt;P&gt;I got the subsearch down but how do I use the results returned from the subsearch in my outer search to pull the _time and UsrAcctName?&lt;/P&gt;

&lt;P&gt;The UsrAcctName I use in the inner search is called Account_Name in the search in the security index. So do I need to define this somewhere?&lt;/P&gt;

&lt;P&gt;Any help would be appreciated.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Mar 2014 14:53:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/subsearch-question/m-p/181685#M52357</guid>
      <dc:creator>Phynyte</dc:creator>
      <dc:date>2014-03-11T14:53:41Z</dc:date>
    </item>
    <item>
      <title>Re: subsearch question</title>
      <link>https://community.splunk.com/t5/Splunk-Search/subsearch-question/m-p/181686#M52358</link>
      <description>&lt;P&gt;Hi Phynyte,&lt;/P&gt;

&lt;P&gt;this is un-tested, but you can try something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=security "An account was successfully logged on." [ search index=randomlogs host=useraccountlist | rename UsrAcctName AS Account_Name | return Account_Name ]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;_time will be returned from your events from the outer search.&lt;/P&gt;

&lt;P&gt;hope this helps ...&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Tue, 11 Mar 2014 15:09:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/subsearch-question/m-p/181686#M52358</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2014-03-11T15:09:57Z</dc:date>
    </item>
  </channel>
</rss>

