<?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 or ‘let stats sort it out’? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Subsearch-or-let-stats-sort-it-out/m-p/495660#M138175</link>
    <description>&lt;P&gt;Ah I see, its more like "from this list of users, who has logged in?"&lt;BR /&gt;
In that case the lookup is still a viable solution - but maybe you can use a field name like 'reviewLogin' instead of 'isAuthorised'&lt;/P&gt;</description>
    <pubDate>Fri, 24 Jan 2020 17:34:51 GMT</pubDate>
    <dc:creator>nickhills</dc:creator>
    <dc:date>2020-01-24T17:34:51Z</dc:date>
    <item>
      <title>Subsearch or ‘let stats sort it out’?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Subsearch-or-let-stats-sort-it-out/m-p/495656#M138171</link>
      <description>&lt;P&gt;Hey folks. Help!&lt;/P&gt;

&lt;P&gt;I have two indexes. &lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;Index 1 - Contains an authoritative list of AWSconfig accounts it.&lt;/LI&gt;
&lt;LI&gt;index 2 - Contains cloudtrail data - logins by account&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;I want to list accounts that haven’t been logged into using my AWSconfig account list (index 1) as Index 2 (cloudtrail) only has logs of what has been logged into at some point...&lt;/P&gt;

&lt;P&gt;I was going to use a subsearch to get a list of unique accounts from index 1 and then pass that into a search against cloudtrail (index 2) - but was wondering if I could use stats instead (cause y’know subsearches have limitations...)&lt;/P&gt;

&lt;P&gt;Thoughts? &lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jan 2020 11:15:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Subsearch-or-let-stats-sort-it-out/m-p/495656#M138171</guid>
      <dc:creator>RocIngersol</dc:creator>
      <dc:date>2020-01-24T11:15:18Z</dc:date>
    </item>
    <item>
      <title>Re: Subsearch or ‘let stats sort it out’?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Subsearch-or-let-stats-sort-it-out/m-p/495657#M138172</link>
      <description>&lt;P&gt;Personally, I might use a lookup for this task.&lt;/P&gt;

&lt;P&gt;I would create a scheduled search to build a list of authorisedAWSAccounts.csv from index1 and run that hourly/daily/weekly depending on your needs.&lt;/P&gt;

&lt;P&gt;Then you can use that lookup in your search against data in index2 to add an 'isAuthorised" field.&lt;/P&gt;

&lt;P&gt;Scheduled Lookup Builder&lt;BR /&gt;
&lt;CODE&gt;index=index1 yourSearchFilter|eval isAuthorised=true|table userName arn isAuthorised|outputlookup authorisedAWSAccounts.csv&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Search index2&lt;BR /&gt;
&lt;CODE&gt;index=index2 yourSearchFilter|lookup authorisedAWSAccounts.csv [userName|arn] OUTPUT isAuthorised|search isAuthorised!=true&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jan 2020 12:41:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Subsearch-or-let-stats-sort-it-out/m-p/495657#M138172</guid>
      <dc:creator>nickhills</dc:creator>
      <dc:date>2020-01-24T12:41:43Z</dc:date>
    </item>
    <item>
      <title>Re: Subsearch or ‘let stats sort it out’?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Subsearch-or-let-stats-sort-it-out/m-p/495658#M138173</link>
      <description>&lt;P&gt;What are the event counts in both indexes (based on the search time range you'll be using)?&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jan 2020 14:32:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Subsearch-or-let-stats-sort-it-out/m-p/495658#M138173</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2020-01-24T14:32:20Z</dc:date>
    </item>
    <item>
      <title>Re: Subsearch or ‘let stats sort it out’?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Subsearch-or-let-stats-sort-it-out/m-p/495659#M138174</link>
      <description>&lt;P&gt;I’m not looking for isAuthed per se more ‘from the a deduped list of master accounts in index1, have they been found logging in determined by the Cloudtrail logs in index2.&lt;/P&gt;

&lt;P&gt;Lookup could work but.. will try and report back. Thx!&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jan 2020 17:31:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Subsearch-or-let-stats-sort-it-out/m-p/495659#M138174</guid>
      <dc:creator>RocIngersol</dc:creator>
      <dc:date>2020-01-24T17:31:18Z</dc:date>
    </item>
    <item>
      <title>Re: Subsearch or ‘let stats sort it out’?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Subsearch-or-let-stats-sort-it-out/m-p/495660#M138175</link>
      <description>&lt;P&gt;Ah I see, its more like "from this list of users, who has logged in?"&lt;BR /&gt;
In that case the lookup is still a viable solution - but maybe you can use a field name like 'reviewLogin' instead of 'isAuthorised'&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jan 2020 17:34:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Subsearch-or-let-stats-sort-it-out/m-p/495660#M138175</guid>
      <dc:creator>nickhills</dc:creator>
      <dc:date>2020-01-24T17:34:51Z</dc:date>
    </item>
    <item>
      <title>Re: Subsearch or ‘let stats sort it out’?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Subsearch-or-let-stats-sort-it-out/m-p/495661#M138176</link>
      <description>&lt;P&gt;Yeah. Sounds good!&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jan 2020 19:11:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Subsearch-or-let-stats-sort-it-out/m-p/495661#M138176</guid>
      <dc:creator>RocIngersol</dc:creator>
      <dc:date>2020-01-24T19:11:55Z</dc:date>
    </item>
  </channel>
</rss>

