<?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 display the results of my transaction search in a table? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-the-results-of-my-transaction-search-in-a-table/m-p/270943#M81564</link>
    <description>&lt;P&gt;Sorry didn't quite get that . &lt;BR /&gt;
By 1 , do you mean &lt;BR /&gt;
You want to find transaction which span across 24 hours and then divide them in 8 hrs span? or you want only thos transactions which are more than 8 hours only?&lt;/P&gt;

&lt;P&gt;By 2 , Gap between what? between two transactions?&lt;/P&gt;</description>
    <pubDate>Sat, 06 Feb 2016 02:58:40 GMT</pubDate>
    <dc:creator>renjith_nair</dc:creator>
    <dc:date>2016-02-06T02:58:40Z</dc:date>
    <item>
      <title>How to display the results of my transaction search in a table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-the-results-of-my-transaction-search-in-a-table/m-p/270936#M81557</link>
      <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;

&lt;P&gt;I'm having an issue displaying transaction data in Table.&lt;BR /&gt;
The end result should look like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;No | Driver ID | Start Date | Start Time | End Date | End Time |
1  |ACBCD      |2/5/2016    |09:00       |2/5/2016  |18:00     |
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;There are 2 criteria: &lt;BR /&gt;
1) Total driving time exceed 8 hrs within 24 hrs by Start Time&lt;BR /&gt;
2) End time is determine by Gap of more than 30 minutes&lt;/P&gt;

&lt;P&gt;My searchstring looks like this, but is not able to display as a table&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="xxxxxx" | transaction maxspan=8h maxpause=30m
| sort _time | streamstats count as TripNo by username
| table _time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Appreciate and feedback.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2016 13:32:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-the-results-of-my-transaction-search-in-a-table/m-p/270936#M81557</guid>
      <dc:creator>Imjusttesting</dc:creator>
      <dc:date>2016-02-05T13:32:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to display the results of my transaction search in a table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-the-results-of-my-transaction-search-in-a-table/m-p/270937#M81558</link>
      <description>&lt;P&gt;Without fixing anything else that may (or may not) be wrong with the search, your &lt;CODE&gt;table&lt;/CODE&gt; doesn't include all the other items.  Try something like...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="xxxxxx" | transaction maxspan=8h maxpause=30m
| sort _time | streamstats count as TripNo by username
| table TripNo, username, start_date, start_time, end_date, end_time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You will obviously have to use your own fieldnames - you didn't provide a sample event to work with so I could only pseudo-code them up. &lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2016 13:44:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-the-results-of-my-transaction-search-in-a-table/m-p/270937#M81558</guid>
      <dc:creator>Richfez</dc:creator>
      <dc:date>2016-02-05T13:44:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to display the results of my transaction search in a table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-the-results-of-my-transaction-search-in-a-table/m-p/270938#M81559</link>
      <description>&lt;P&gt;Thanks.&lt;/P&gt;

&lt;P&gt;I tried your search string, Tripno, Username are included but Start and End time are not included.&lt;BR /&gt;
Is there any way to include the Start and End time?&lt;/P&gt;

&lt;P&gt;I'm using the _time for all event.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2016 13:54:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-the-results-of-my-transaction-search-in-a-table/m-p/270938#M81559</guid>
      <dc:creator>Imjusttesting</dc:creator>
      <dc:date>2016-02-05T13:54:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to display the results of my transaction search in a table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-the-results-of-my-transaction-search-in-a-table/m-p/270939#M81560</link>
      <description>&lt;P&gt;I'm also not sure this search will do quite what you want.  I think your criteria 2 should be fine with your maxpause.  &lt;/P&gt;

&lt;P&gt;Criteria 1 - what actually do you mean?  If you mean they CAN'T drive longer than 8 hours in a day, that's different from they SHOULDN'T drive more than 8 hours a day, which is completely different from "Find transactions where they DID drive longer than 8 hours in a 24 hour period."  In several of those cases you may end up wanting &lt;CODE&gt;maxspan=24h&lt;/CODE&gt;.  You may have overlapping transactions within periods, though, which may force you to take a different tack.  It would probably be worth a different question to answer that (to keep this one clean and easy to search), but there are answers for trickier things like that, see &lt;A href="https://answers.splunk.com/answers/325953/transaction-with-count-of-successive-events.html"&gt;this as an example (the comments)&lt;/A&gt;.&lt;/P&gt;

&lt;P&gt;Those thoughts and links were just to get you started, hopefully just that bit of info will help you clarify what you are actually trying to display.  If you need help with that, please ask, otherwise, have fun Splunking!&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2016 13:55:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-the-results-of-my-transaction-search-in-a-table/m-p/270939#M81560</guid>
      <dc:creator>Richfez</dc:creator>
      <dc:date>2016-02-05T13:55:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to display the results of my transaction search in a table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-the-results-of-my-transaction-search-in-a-table/m-p/270940#M81561</link>
      <description>&lt;P&gt;Try this for table format&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="xxxxxx" | transaction maxspan=8h maxpause=30m| sort _time 
|streamstats count as TripNo by username|eval end=_time+duration
|eval "Start Date"=strftime(_time,"%d-%b-%Y")|eval "End Date"=strftime(end,"%d-%b-%Y")
|eval "Start Time"=strftime(_time,"%H:%M:%S")|eval "End Time"=strftime(end,"%H:%M:%S")
|table TripNo username "Start Date" "Start Time" "End Date" "End Time"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 05 Feb 2016 14:00:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-the-results-of-my-transaction-search-in-a-table/m-p/270940#M81561</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2016-02-05T14:00:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to display the results of my transaction search in a table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-the-results-of-my-transaction-search-in-a-table/m-p/270941#M81562</link>
      <description>&lt;P&gt;Thanks @renjith.nair &lt;/P&gt;

&lt;P&gt;This work perfectly fine.&lt;BR /&gt;
Now the next issues, are the criteria;&lt;BR /&gt;
1) Total driving time exceed 8 hrs within 24 hrs by Start Time&lt;BR /&gt;
2) End time is determine by Gap of more than 30 minutes&lt;/P&gt;

&lt;P&gt;When i look at the Table, some of the data are not group within the 8 hours span and the Stop don't have a 30 mins gap&lt;/P&gt;

&lt;P&gt;What the best way to deal with this?&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2016 14:05:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-the-results-of-my-transaction-search-in-a-table/m-p/270941#M81562</guid>
      <dc:creator>Imjusttesting</dc:creator>
      <dc:date>2016-02-05T14:05:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to display the results of my transaction search in a table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-the-results-of-my-transaction-search-in-a-table/m-p/270942#M81563</link>
      <description>&lt;P&gt;The 1st criteria is, we only need to identify driver that are driving for more than 8 hours.&lt;BR /&gt;
2nd criteria, the Stop, is identify if there is more than 30 mins Gap.&lt;BR /&gt;
(The data are constantly send every 1 mins and if the engine is cut off, nothing is send. Thus if there is no event between 30 mins after the last record, then that is a Stop)&lt;/P&gt;

&lt;P&gt;Hope this clarify everything&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2016 14:08:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-the-results-of-my-transaction-search-in-a-table/m-p/270942#M81563</guid>
      <dc:creator>Imjusttesting</dc:creator>
      <dc:date>2016-02-05T14:08:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to display the results of my transaction search in a table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-the-results-of-my-transaction-search-in-a-table/m-p/270943#M81564</link>
      <description>&lt;P&gt;Sorry didn't quite get that . &lt;BR /&gt;
By 1 , do you mean &lt;BR /&gt;
You want to find transaction which span across 24 hours and then divide them in 8 hrs span? or you want only thos transactions which are more than 8 hours only?&lt;/P&gt;

&lt;P&gt;By 2 , Gap between what? between two transactions?&lt;/P&gt;</description>
      <pubDate>Sat, 06 Feb 2016 02:58:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-the-results-of-my-transaction-search-in-a-table/m-p/270943#M81564</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2016-02-06T02:58:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to display the results of my transaction search in a table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-the-results-of-my-transaction-search-in-a-table/m-p/270944#M81565</link>
      <description>&lt;P&gt;Sorry, missed your message&lt;/P&gt;

&lt;P&gt;1) I would like to include transaction which are more than 8 hours&lt;BR /&gt;
2) The 30 mins gap is between the transaction. Meaning if there a 30 mins gap between the transaction, the next event will be a new event&lt;/P&gt;</description>
      <pubDate>Tue, 09 Feb 2016 02:18:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-the-results-of-my-transaction-search-in-a-table/m-p/270944#M81565</guid>
      <dc:creator>Imjusttesting</dc:creator>
      <dc:date>2016-02-09T02:18:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to display the results of my transaction search in a table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-the-results-of-my-transaction-search-in-a-table/m-p/270945#M81566</link>
      <description>&lt;P&gt;If you would like to include only transaction which are more than 8hrs, then i think maxpause won't work here since maxpause limits the transaction to 8 hours&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;     Syntax: maxpause=&amp;lt;int&amp;gt;[s | m | h | d]
    Description: Specifies the maximum time in seconds, minutes, hours, or days that the events can span. The maxpause constraint requires there be no pause between a transaction's events of greater than maxpause. If value is negative, disable the maxpause constraint. 
    Default: -1 (no limit)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You should use maxpause only if the driver is supposed to drive only "x" hours which is not your case i believe.&lt;/P&gt;

&lt;P&gt;If you have any other uniquely identified fields in these events to co-relate two events rather than time based, that would make things easier &lt;/P&gt;

&lt;P&gt;Once you correct the initial search , then you can add &lt;CODE&gt;|where duration &amp;gt; 28800&lt;/CODE&gt; to get the transactions more than 8 hours&lt;/P&gt;</description>
      <pubDate>Wed, 10 Feb 2016 04:54:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-the-results-of-my-transaction-search-in-a-table/m-p/270945#M81566</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2016-02-10T04:54:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to display the results of my transaction search in a table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-the-results-of-my-transaction-search-in-a-table/m-p/270946#M81567</link>
      <description>&lt;P&gt;Thanks &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
Working good.&lt;/P&gt;</description>
      <pubDate>Sun, 14 Feb 2016 12:53:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-the-results-of-my-transaction-search-in-a-table/m-p/270946#M81567</guid>
      <dc:creator>Imjusttesting</dc:creator>
      <dc:date>2016-02-14T12:53:14Z</dc:date>
    </item>
  </channel>
</rss>

