<?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 Searching a second source type based on a list of results from a first search in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Searching-a-second-source-type-based-on-a-list-of-results-from-a/m-p/202498#M176269</link>
    <description>&lt;P&gt;I would like to find lines in log A based on the results of search B, but havent been able to get what I want using subsearches (or havent been using them right). Suggestions?&lt;/P&gt;

&lt;P&gt;Search B gives me a list of IDs that could be 100 ids long&lt;BR /&gt;
index=foo  sourcetype=bar a.long.api.domain.identifier  | chart dc(A_session_id) by A_session_id&lt;/P&gt;

&lt;P&gt;I'd like Search A to give me a list of lines containing at least 1 of the A_session_ids, and also matching a few other characteristics:&lt;BR /&gt;
index=foo sourcetype=bar2 A_session_id "and.another.identifier" (In this case, I'm hoping "A_session_id" is a list of IDs returned by the first searchO&lt;/P&gt;

&lt;P&gt;Heres how I tried my subsearch:&lt;BR /&gt;
index=foo sourcetype=bar2 and.another.identifier [search sourcetype=bar a.long.api.domain.identifier  | chart dc(ts) by A_session_id]&lt;/P&gt;

&lt;P&gt;thanks in advance! Sorry for the noob questions&lt;/P&gt;

&lt;P&gt;Any tips?&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 11:38:23 GMT</pubDate>
    <dc:creator>dreeck</dc:creator>
    <dc:date>2020-09-29T11:38:23Z</dc:date>
    <item>
      <title>Searching a second source type based on a list of results from a first search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Searching-a-second-source-type-based-on-a-list-of-results-from-a/m-p/202498#M176269</link>
      <description>&lt;P&gt;I would like to find lines in log A based on the results of search B, but havent been able to get what I want using subsearches (or havent been using them right). Suggestions?&lt;/P&gt;

&lt;P&gt;Search B gives me a list of IDs that could be 100 ids long&lt;BR /&gt;
index=foo  sourcetype=bar a.long.api.domain.identifier  | chart dc(A_session_id) by A_session_id&lt;/P&gt;

&lt;P&gt;I'd like Search A to give me a list of lines containing at least 1 of the A_session_ids, and also matching a few other characteristics:&lt;BR /&gt;
index=foo sourcetype=bar2 A_session_id "and.another.identifier" (In this case, I'm hoping "A_session_id" is a list of IDs returned by the first searchO&lt;/P&gt;

&lt;P&gt;Heres how I tried my subsearch:&lt;BR /&gt;
index=foo sourcetype=bar2 and.another.identifier [search sourcetype=bar a.long.api.domain.identifier  | chart dc(ts) by A_session_id]&lt;/P&gt;

&lt;P&gt;thanks in advance! Sorry for the noob questions&lt;/P&gt;

&lt;P&gt;Any tips?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 11:38:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Searching-a-second-source-type-based-on-a-list-of-results-from-a/m-p/202498#M176269</guid>
      <dc:creator>dreeck</dc:creator>
      <dc:date>2020-09-29T11:38:23Z</dc:date>
    </item>
    <item>
      <title>Re: Searching a second source type based on a list of results from a first search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Searching-a-second-source-type-based-on-a-list-of-results-from-a/m-p/202499#M176270</link>
      <description>&lt;P&gt;If search A contains a field with the same name and value as A_session_id from searchB, try like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=foo sourcetype=bar2 "and.another.identifier" [search sourcetype=bar a.long.api.domain.identifier | chart dc(ts) by A_session_id | table A_session_id ]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If search A contains a field with the different name but same value as A_session_id from searchB, try like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=foo sourcetype=bar2 "and.another.identifier" [search sourcetype=bar a.long.api.domain.identifier | chart dc(ts) by A_session_id | table A_session_id | rename A_session_id as fieldNameInSearchALogs ]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If search A doesn't contain a field but you want to do a text/string based search, try like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=foo sourcetype=bar2 "and.another.identifier" [search sourcetype=bar a.long.api.domain.identifier | chart dc(ts) by A_session_id | table A_session_id | rename A_session_id as search ]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Sep 2020 11:39:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Searching-a-second-source-type-based-on-a-list-of-results-from-a/m-p/202499#M176270</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2020-09-29T11:39:34Z</dc:date>
    </item>
    <item>
      <title>Re: Searching a second source type based on a list of results from a first search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Searching-a-second-source-type-based-on-a-list-of-results-from-a/m-p/202500#M176271</link>
      <description>&lt;P&gt;I tried approach 3 - this works, but only shows results for a single value in  A_session_id. For example, when I run ah hour long search with a search like this:&lt;/P&gt;

&lt;P&gt;index=foo sourcetype=bar2 "and.another.identifier" [search sourcetype=bar a.long.api.domain.identifier | chart dc(ts) by A_session_id | table A_session_id | rename A_session_id as search ]&lt;/P&gt;

&lt;P&gt;I get show lines from sourcetype=bar2 including a single value for A_session_id&lt;/P&gt;

&lt;P&gt;If I run just the sub search "sourcetype=bar a.long.api.domain.identifier | chart dc(ts) by A_session_id | table A_session_id |" I get 6k+ lines. &lt;/P&gt;

&lt;P&gt;Is it possible it's only passing 1 result?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 11:38:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Searching-a-second-source-type-based-on-a-list-of-results-from-a/m-p/202500#M176271</guid>
      <dc:creator>dreeck</dc:creator>
      <dc:date>2020-09-29T11:38:41Z</dc:date>
    </item>
  </channel>
</rss>

