<?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: efficient search to retrieve information about user sessions with errors in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/efficient-search-to-retrieve-information-about-user-sessions/m-p/186868#M53825</link>
    <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=devdata [search index=devdata "ERROR" | dedup session | table session] 
| stats earliest(_time) as startTime by session 
| append [search index=devdata session=* "ERROR" | table _time, session, _raw]
| stats first(startTime) as startTime first(_time) as _time first(_raw) as _raw by session
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This should give you startTime of the session, _time and _raw from the Error session.&lt;/P&gt;</description>
    <pubDate>Tue, 19 Aug 2014 15:23:38 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2014-08-19T15:23:38Z</dc:date>
    <item>
      <title>efficient search to retrieve information about user sessions with errors</title>
      <link>https://community.splunk.com/t5/Splunk-Search/efficient-search-to-retrieve-information-about-user-sessions/m-p/186866#M53823</link>
      <description>&lt;P&gt;index=devdata session=* "ERROR"| eval errorSession=session | join type=outer session [search index=devdata session=errorSession | dedup session sortby _time | eval startTime = _time ] | table _time, session, startTime, _raw  &lt;/P&gt;

&lt;P&gt;In what sessions do ERRORs occur? When did the error sessions start? &lt;/P&gt;

&lt;P&gt;I'm hitting some problems and would like some advice on how to write an efficient search to answer these questions.&lt;BR /&gt;
    1) The above session=errorSession does not appear to work. &lt;BR /&gt;
    2) join seems pretty slow&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 19 Aug 2014 14:46:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/efficient-search-to-retrieve-information-about-user-sessions/m-p/186866#M53823</guid>
      <dc:creator>juniormint</dc:creator>
      <dc:date>2014-08-19T14:46:06Z</dc:date>
    </item>
    <item>
      <title>Re: efficient search to retrieve information about user sessions with errors</title>
      <link>https://community.splunk.com/t5/Splunk-Search/efficient-search-to-retrieve-information-about-user-sessions/m-p/186867#M53824</link>
      <description>&lt;P&gt;This search will give you all of the session IDs with errors:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;index=devdata "ERROR" | dedup session | table session&lt;/CODE&gt; &lt;/P&gt;

&lt;P&gt;Use this as a subsearch to get all events for each such session:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;index=devdata [search index=devdata "ERROR" | dedup session | table session]&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Now tweak it to get the just first event of each such session, and make that your output:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;index=devdata [search index=devdata "ERROR" | dedup session | table session] | dedup session sortby +_time | table _time, session, _raw&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Aug 2014 15:16:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/efficient-search-to-retrieve-information-about-user-sessions/m-p/186867#M53824</guid>
      <dc:creator>aweitzman</dc:creator>
      <dc:date>2014-08-19T15:16:34Z</dc:date>
    </item>
    <item>
      <title>Re: efficient search to retrieve information about user sessions with errors</title>
      <link>https://community.splunk.com/t5/Splunk-Search/efficient-search-to-retrieve-information-about-user-sessions/m-p/186868#M53825</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=devdata [search index=devdata "ERROR" | dedup session | table session] 
| stats earliest(_time) as startTime by session 
| append [search index=devdata session=* "ERROR" | table _time, session, _raw]
| stats first(startTime) as startTime first(_time) as _time first(_raw) as _raw by session
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This should give you startTime of the session, _time and _raw from the Error session.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Aug 2014 15:23:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/efficient-search-to-retrieve-information-about-user-sessions/m-p/186868#M53825</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-08-19T15:23:38Z</dc:date>
    </item>
    <item>
      <title>Re: efficient search to retrieve information about user sessions with errors</title>
      <link>https://community.splunk.com/t5/Splunk-Search/efficient-search-to-retrieve-information-about-user-sessions/m-p/186869#M53826</link>
      <description>&lt;P&gt;Pretty good answer...capturing the error message rather than first message seen more aligned with my use case.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Aug 2014 20:27:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/efficient-search-to-retrieve-information-about-user-sessions/m-p/186869#M53826</guid>
      <dc:creator>juniormint</dc:creator>
      <dc:date>2014-08-19T20:27:38Z</dc:date>
    </item>
  </channel>
</rss>

