<?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 Is it possible to aggregate and search within aggregated results? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-aggregate-and-search-within-aggregated-results/m-p/344421#M102009</link>
    <description>&lt;P&gt;My app logs multiple lines per request and each line has a "request_id" key for identification. For each request, there is an optional log line that contains a "session_id" key. How do I search to show all the log lines of a particular request which includes the "session_id" key?&lt;/P&gt;

&lt;P&gt;Example:&lt;BR /&gt;
request_id=1, msg=A&lt;BR /&gt;
request_id=1, msg=B&lt;BR /&gt;
request_id=2, msg=C, session_id=1&lt;BR /&gt;
request_id=2, msg=D&lt;/P&gt;

&lt;P&gt;Wanted result:&lt;BR /&gt;
request_id=2, msg=C, session_id=1&lt;BR /&gt;
request_id=2, msg=D&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 13:47:45 GMT</pubDate>
    <dc:creator>sohymg</dc:creator>
    <dc:date>2020-09-29T13:47:45Z</dc:date>
    <item>
      <title>Is it possible to aggregate and search within aggregated results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-aggregate-and-search-within-aggregated-results/m-p/344421#M102009</link>
      <description>&lt;P&gt;My app logs multiple lines per request and each line has a "request_id" key for identification. For each request, there is an optional log line that contains a "session_id" key. How do I search to show all the log lines of a particular request which includes the "session_id" key?&lt;/P&gt;

&lt;P&gt;Example:&lt;BR /&gt;
request_id=1, msg=A&lt;BR /&gt;
request_id=1, msg=B&lt;BR /&gt;
request_id=2, msg=C, session_id=1&lt;BR /&gt;
request_id=2, msg=D&lt;/P&gt;

&lt;P&gt;Wanted result:&lt;BR /&gt;
request_id=2, msg=C, session_id=1&lt;BR /&gt;
request_id=2, msg=D&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 13:47:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-aggregate-and-search-within-aggregated-results/m-p/344421#M102009</guid>
      <dc:creator>sohymg</dc:creator>
      <dc:date>2020-09-29T13:47:45Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to aggregate and search within aggregated results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-aggregate-and-search-within-aggregated-results/m-p/344422#M102010</link>
      <description>&lt;P&gt;Hello sohymg,&lt;BR /&gt;
indicate in your search that you are looking for events with the &lt;STRONG&gt;session&lt;/STRONG&gt; field&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index = &amp;lt;yourIndex&amp;gt; sourcetype = &amp;lt;yourSourcetype&amp;gt; request_id=* msg=* session=* | table _time host request_id msg session
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;hope it helps&lt;/P&gt;</description>
      <pubDate>Mon, 24 Apr 2017 14:45:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-aggregate-and-search-within-aggregated-results/m-p/344422#M102010</guid>
      <dc:creator>adonio</dc:creator>
      <dc:date>2017-04-24T14:45:00Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to aggregate and search within aggregated results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-aggregate-and-search-within-aggregated-results/m-p/344423#M102011</link>
      <description>&lt;P&gt;Your text says &lt;CODE&gt;session_id&lt;/CODE&gt; but your example says &lt;CODE&gt;session=&lt;/CODE&gt;.  adonio's answer assumed the example data was correct, as opposed to your written description.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Apr 2017 17:01:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-aggregate-and-search-within-aggregated-results/m-p/344423#M102011</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-04-24T17:01:20Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to aggregate and search within aggregated results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-aggregate-and-search-within-aggregated-results/m-p/344424#M102012</link>
      <description>&lt;P&gt;I tried this and there was no result. Just to clarify:&lt;/P&gt;

&lt;P&gt;This is the entire dataset:&lt;BR /&gt;
request_id=1, msg=A&lt;BR /&gt;
request_id=1, msg=B&lt;BR /&gt;
request_id=2, msg=C, session=1&lt;BR /&gt;
request_id=2, msg=D&lt;/P&gt;

&lt;P&gt;This is the result I need:&lt;BR /&gt;
request_id=2, msg=C, session=1&lt;BR /&gt;
request_id=2, msg=D&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 13:48:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-aggregate-and-search-within-aggregated-results/m-p/344424#M102012</guid>
      <dc:creator>sohymg</dc:creator>
      <dc:date>2020-09-29T13:48:07Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to aggregate and search within aggregated results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-aggregate-and-search-within-aggregated-results/m-p/344425#M102013</link>
      <description>&lt;P&gt;did you replace the values for index and sourcetype to match yours?&lt;/P&gt;</description>
      <pubDate>Tue, 25 Apr 2017 12:51:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-aggregate-and-search-within-aggregated-results/m-p/344425#M102013</guid>
      <dc:creator>adonio</dc:creator>
      <dc:date>2017-04-25T12:51:52Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to aggregate and search within aggregated results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-aggregate-and-search-within-aggregated-results/m-p/344426#M102014</link>
      <description>&lt;P&gt;Sorry there was some typo. I got it to work but the result is not what i want &lt;/P&gt;

&lt;P&gt;Returned result:&lt;BR /&gt;
request_id=2, msg=C, session=1&lt;/P&gt;

&lt;P&gt;This is the result I need:&lt;BR /&gt;
request_id=2, msg=C, session=1&lt;BR /&gt;
request_id=2, msg=D&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 13:48:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-aggregate-and-search-within-aggregated-results/m-p/344426#M102014</guid>
      <dc:creator>sohymg</dc:creator>
      <dc:date>2020-09-29T13:48:31Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to aggregate and search within aggregated results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-aggregate-and-search-within-aggregated-results/m-p/344427#M102015</link>
      <description>&lt;P&gt;so to be clear, what you would like to see is: if you have a value of 1 under the session field (session=1) then you want to see all events with request_id=2. is that correct?&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2017 12:02:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-aggregate-and-search-within-aggregated-results/m-p/344427#M102015</guid>
      <dc:creator>adonio</dc:creator>
      <dc:date>2017-04-26T12:02:44Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to aggregate and search within aggregated results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-aggregate-and-search-within-aggregated-results/m-p/344428#M102016</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;| eval r=_raw
| fields - _time _raw
| makemv r delim="request_" 
| mvexpand r 
| rex field=r "id=(?&amp;lt;request_id&amp;gt;\d+)\,\s+msg=(?&amp;lt;msg&amp;gt;\w+)(\,\s+session_id=(?&amp;lt;session&amp;gt;\d+))?" 
| rex field=r mode=sed "s/^id=/request_id=/g"
| search request_id=2 
| fields r
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 26 Apr 2017 14:51:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-aggregate-and-search-within-aggregated-results/m-p/344428#M102016</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2017-04-26T14:51:11Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to aggregate and search within aggregated results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-aggregate-and-search-within-aggregated-results/m-p/344429#M102017</link>
      <description>&lt;P&gt;Yes thats correct&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2017 01:08:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-aggregate-and-search-within-aggregated-results/m-p/344429#M102017</guid>
      <dc:creator>sohymg</dc:creator>
      <dc:date>2017-04-27T01:08:39Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to aggregate and search within aggregated results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-aggregate-and-search-within-aggregated-results/m-p/344430#M102018</link>
      <description>&lt;P&gt;I get some rows but they are empty. &lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2017 01:18:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-aggregate-and-search-within-aggregated-results/m-p/344430#M102018</guid>
      <dc:creator>sohymg</dc:creator>
      <dc:date>2017-04-27T01:18:32Z</dc:date>
    </item>
  </channel>
</rss>

