<?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: How to list all the events from a transaction in a tabular format with specific fields in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-list-all-the-events-from-a-transaction-in-a-tabular/m-p/65351#M16224</link>
    <description>&lt;P&gt;My advice would be to rewrite the search so that it doesn't use &lt;CODE&gt;transaction&lt;/CODE&gt; at all. Something like this.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=access_combined_wcookie host="qqqq*" | stats list(req_time) as req_time, list(Hybris_SessionID) as Hybris_SessionID, list(status) as status, list(uri) as uri by SessionID | where mvfind(status,"^404$") AND mvfind(uri,"checklogin")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;EDIT: So if you don't actually want to have aggregated events after all you could use &lt;CODE&gt;eventstats&lt;/CODE&gt;.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=access_combined_wcookie host="qqqq*" | eventstats list(status) as mvstatus, list(uri) as mvuri by SessionID | where mvfind(mvstatus,"^404$") AND mvfind(mvuri,"checklogin") | table req_time, Hybris_SessionID, status, uri
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This will perform statistics that are written to individual events, then filter out the events that do not belong to a session with status 404 and uri checklogin. Original events and their respective original fields are retained though, as is the order, so you might want to sort your results by something so different sessions' results aren't mixed with each other (like for instance throwing a "&lt;CODE&gt;sort SessionID&lt;/CODE&gt;" in before &lt;CODE&gt;table&lt;/CODE&gt;).&lt;/P&gt;</description>
    <pubDate>Mon, 17 Jun 2013 14:58:53 GMT</pubDate>
    <dc:creator>Ayn</dc:creator>
    <dc:date>2013-06-17T14:58:53Z</dc:date>
    <item>
      <title>How to list all the events from a transaction in a tabular format with specific fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-list-all-the-events-from-a-transaction-in-a-tabular/m-p/65350#M16223</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;we want to output only certain fields from a transaction in a tabular format. For example, we want only uri, status, referrer and req_time. I have tried something like this..but it was not showing status for all the uris, etc. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=access_combined_wcookie host="qqqq*" | transaction SessionID | search status="404" uri="*checklogin*" | table req_time, Hybris_SessionID, status, uri
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 17 Jun 2013 14:40:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-list-all-the-events-from-a-transaction-in-a-tabular/m-p/65350#M16223</guid>
      <dc:creator>xvxt006</dc:creator>
      <dc:date>2013-06-17T14:40:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to list all the events from a transaction in a tabular format with specific fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-list-all-the-events-from-a-transaction-in-a-tabular/m-p/65351#M16224</link>
      <description>&lt;P&gt;My advice would be to rewrite the search so that it doesn't use &lt;CODE&gt;transaction&lt;/CODE&gt; at all. Something like this.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=access_combined_wcookie host="qqqq*" | stats list(req_time) as req_time, list(Hybris_SessionID) as Hybris_SessionID, list(status) as status, list(uri) as uri by SessionID | where mvfind(status,"^404$") AND mvfind(uri,"checklogin")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;EDIT: So if you don't actually want to have aggregated events after all you could use &lt;CODE&gt;eventstats&lt;/CODE&gt;.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=access_combined_wcookie host="qqqq*" | eventstats list(status) as mvstatus, list(uri) as mvuri by SessionID | where mvfind(mvstatus,"^404$") AND mvfind(mvuri,"checklogin") | table req_time, Hybris_SessionID, status, uri
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This will perform statistics that are written to individual events, then filter out the events that do not belong to a session with status 404 and uri checklogin. Original events and their respective original fields are retained though, as is the order, so you might want to sort your results by something so different sessions' results aren't mixed with each other (like for instance throwing a "&lt;CODE&gt;sort SessionID&lt;/CODE&gt;" in before &lt;CODE&gt;table&lt;/CODE&gt;).&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jun 2013 14:58:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-list-all-the-events-from-a-transaction-in-a-tabular/m-p/65351#M16224</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2013-06-17T14:58:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to list all the events from a transaction in a tabular format with specific fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-list-all-the-events-from-a-transaction-in-a-tabular/m-p/65352#M16225</link>
      <description>&lt;P&gt;Thank you Ayn. This is helpful. But we are trying to see all the events along with those when there are failures happend in a cleaner fashion. Any suggestions?&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jun 2013 15:03:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-list-all-the-events-from-a-transaction-in-a-tabular/m-p/65352#M16225</guid>
      <dc:creator>xvxt006</dc:creator>
      <dc:date>2013-06-17T15:03:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to list all the events from a transaction in a tabular format with specific fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-list-all-the-events-from-a-transaction-in-a-tabular/m-p/65353#M16226</link>
      <description>&lt;P&gt;Well as soon as you're running &lt;CODE&gt;stats&lt;/CODE&gt; or &lt;CODE&gt;transaction&lt;/CODE&gt; you really remove the concept of the original events. You might want to look into using &lt;CODE&gt;eventstats&lt;/CODE&gt; instead if you want to filter events but not aggregate anything. Editing my answer with a proposed approach.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jun 2013 15:06:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-list-all-the-events-from-a-transaction-in-a-tabular/m-p/65353#M16226</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2013-06-17T15:06:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to list all the events from a transaction in a tabular format with specific fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-list-all-the-events-from-a-transaction-in-a-tabular/m-p/65354#M16227</link>
      <description>&lt;P&gt;Thanks Ayn.  The first query you have is not giving any data. You have SessionID which is not a filed in our system. You meant Hybris_SessionID? if i have that, it is complaining that "The output field 'Hybris_SessionID' cannot have the same name as a group-by field."&lt;/P&gt;

&lt;P&gt;sourcetype=access_combined_wcookie host="prlws*" | stats list(req_time) as req_time, list(Hybris_SessionID) as Hybris_SessionID, list(status) as status, list(uri) as uri by SessionID  where mvfind(status,"^404$") AND mvfind(uri,"checklogin")&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 14:06:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-list-all-the-events-from-a-transaction-in-a-tabular/m-p/65354#M16227</guid>
      <dc:creator>xvxt006</dc:creator>
      <dc:date>2020-09-28T14:06:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to list all the events from a transaction in a tabular format with specific fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-list-all-the-events-from-a-transaction-in-a-tabular/m-p/65355#M16228</link>
      <description>&lt;P&gt;Well "SessionID" is what you specified yourself when you showed us the search you were using, so... &lt;span class="lia-unicode-emoji" title=":face_with_tongue:"&gt;😛&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;If you really meant Hybris_SessionID then yes, it would make no sense to both list and split by it. In that case just remove the list(Hybris_SessionID).&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 14:07:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-list-all-the-events-from-a-transaction-in-a-tabular/m-p/65355#M16228</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2020-09-28T14:07:04Z</dc:date>
    </item>
  </channel>
</rss>

