<?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: Extract value from first index and search in second index in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Extract-value-from-first-index-and-search-in-second-index/m-p/538348#M152168</link>
    <description>&lt;P&gt;I am not sure, but, lets try this once...&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;index=main-app OR (index=auth-app "createsession") | rex field=_raw "UID: (?&amp;lt;uid&amp;gt;......)" | stats count(uid)&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 02 Feb 2021 21:51:00 GMT</pubDate>
    <dc:creator>inventsekar</dc:creator>
    <dc:date>2021-02-02T21:51:00Z</dc:date>
    <item>
      <title>Extract value from first index and search in second index</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-value-from-first-index-and-search-in-second-index/m-p/538329#M152161</link>
      <description>&lt;P&gt;Hi, I'm new to splunk so pardon if its a straightforward query&lt;/P&gt;&lt;P&gt;I want to extract userIds from my first index and check how many does not exist in second index&lt;/P&gt;&lt;P&gt;Example: index=auth-app would have field like&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;U&lt;SPAN class="t"&gt;ID:&lt;/SPAN&gt; &lt;SPAN class="t"&gt;H0XF7PQU1&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="t"&gt;So, I want to extract&amp;nbsp;&lt;STRONG&gt;H0XF7PQU1&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;from first query and check if it exist in second query (index=main-app) and get count of ids that exist one first index but not in second.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Conceptually, I want to get count of users that passed authentication (first index) but still did not make it to main application (second index)&lt;/P&gt;</description>
      <pubDate>Tue, 02 Feb 2021 19:17:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-value-from-first-index-and-search-in-second-index/m-p/538329#M152161</guid>
      <dc:creator>ank15july96</dc:creator>
      <dc:date>2021-02-02T19:17:37Z</dc:date>
    </item>
    <item>
      <title>Re: Extract value from first index and search in second index</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-value-from-first-index-and-search-in-second-index/m-p/538339#M152164</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi.. do you know if UID is extracted?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;pls try&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(index=auth-app OR&amp;nbsp;index=main-app) UID&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;or, simply please try..&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(index=auth-app OR&amp;nbsp;index=main-app)&amp;nbsp;&lt;STRONG&gt;&lt;SPAN class="t"&gt;H0XF7PQU1&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;update us your results, thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Feb 2021 20:06:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-value-from-first-index-and-search-in-second-index/m-p/538339#M152164</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2021-02-02T20:06:36Z</dc:date>
    </item>
    <item>
      <title>Re: Extract value from first index and search in second index</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-value-from-first-index-and-search-in-second-index/m-p/538341#M152165</link>
      <description>&lt;P&gt;Its a bit trickier than that&lt;BR /&gt;Here's my first query&lt;/P&gt;&lt;P&gt;index=auth-app "createSession" | rex field=_raw "UID: (?&amp;lt;uid&amp;gt;.*)"&lt;/P&gt;&lt;P&gt;And second query should be something like index=main-app uid | stats count&lt;/P&gt;&lt;P&gt;How do i put above two into what you suggested --&lt;STRONG&gt;&amp;nbsp;(index=auth-app OR&amp;nbsp;index=main-app) UID | stats count&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Feb 2021 20:28:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-value-from-first-index-and-search-in-second-index/m-p/538341#M152165</guid>
      <dc:creator>ank15july96</dc:creator>
      <dc:date>2021-02-02T20:28:42Z</dc:date>
    </item>
    <item>
      <title>Re: Extract value from first index and search in second index</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-value-from-first-index-and-search-in-second-index/m-p/538344#M152166</link>
      <description>&lt;P&gt;Okay, I tried this and this sorta works but one issue&lt;BR /&gt;Query:&lt;/P&gt;&lt;P&gt;index=main-app [search index=auth-app "createsession" | rex field=_raw "UID: (?&amp;lt;uid&amp;gt;......)" | table uid ] | stats count&lt;/P&gt;&lt;P&gt;The subquery results in something like this &lt;STRONG&gt;UID="XYZ" OR UID="ABC"&lt;/STRONG&gt; etc so overall query becomes likes this&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;index=main-app&amp;nbsp;UID="XYZ" OR UID="ABC"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;But I just want to search as keyword in second index not as a UID field. So basically like this&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;index=main-app "XYZ" OR "ABC"&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;How can I achieve this?&lt;/P&gt;</description>
      <pubDate>Tue, 02 Feb 2021 20:50:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-value-from-first-index-and-search-in-second-index/m-p/538344#M152166</guid>
      <dc:creator>ank15july96</dc:creator>
      <dc:date>2021-02-02T20:50:31Z</dc:date>
    </item>
    <item>
      <title>Re: Extract value from first index and search in second index</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-value-from-first-index-and-search-in-second-index/m-p/538347#M152167</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Please try...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;index=main-app | join uid [search index=auth-app "createsession" | rex field=_raw "UID: (?&amp;lt;uid&amp;gt;......)" | fields uid ] | stats count&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Feb 2021 21:44:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-value-from-first-index-and-search-in-second-index/m-p/538347#M152167</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2021-02-02T21:44:33Z</dc:date>
    </item>
    <item>
      <title>Re: Extract value from first index and search in second index</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-value-from-first-index-and-search-in-second-index/m-p/538348#M152168</link>
      <description>&lt;P&gt;I am not sure, but, lets try this once...&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;index=main-app OR (index=auth-app "createsession") | rex field=_raw "UID: (?&amp;lt;uid&amp;gt;......)" | stats count(uid)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Feb 2021 21:51:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-value-from-first-index-and-search-in-second-index/m-p/538348#M152168</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2021-02-02T21:51:00Z</dc:date>
    </item>
  </channel>
</rss>

