<?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 output for tomcat logs with starttime and endtime? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-the-output-for-tomcat-logs-with-starttime-and/m-p/192397#M55317</link>
    <description>&lt;P&gt;What does your input look like?&lt;/P&gt;</description>
    <pubDate>Mon, 23 Mar 2015 16:48:37 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2015-03-23T16:48:37Z</dc:date>
    <item>
      <title>How to display the output for tomcat logs with starttime and endtime?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-the-output-for-tomcat-logs-with-starttime-and/m-p/192396#M55316</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
For query&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(SEVERE OR exception OR CRITICAL OR "[error]")|rex field=_raw  "(?^\d\d-\w\w\w-\d\d\d\d\s\d\d:\d\d:\d\d.\d\d\d)\s(?.*)"|stats count(detail) as ct by detail
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I get the following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;detail  ct
SEVERE [tomcat-http--38] org.apache.catalina.core.ApplicationDispatcher.invoke Servlet.service() for servlet jsp threw exception    11
SEVERE [tomcat-http--47] org.apache.catalina.core.ApplicationDispatcher.invoke Servlet.service() for servlet jsp threw exception    6
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Now I want to include the start mtime and end mtime in the output so that I can see something like following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;SEVERE [tomcat-http--38] org.apache.catalina.core.ApplicationDispatcher.invoke Servlet.service() for servlet jsp threw exception    11  starttime  endtime of the 11 events
SEVERE [tomcat-http--47] org.apache.catalina.core.ApplicationDispatcher.invoke Servlet.service() for servlet jsp threw exception    6   starttime of the 6 events endtime of the 6 events
SEVERE [tomcat-http--20] org.apache.catalina.core.ApplicationDispatcher.invoke Servlet.service() for servlet jsp threw exception    1   starttime  endtime (where both starttime = endtime because only 1 event) 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Tried with &lt;CODE&gt;eventstats min(mtime) and max(mtime)&lt;/CODE&gt;, but getting min of mtime of all the 18 events. Running out of ideas.&lt;BR /&gt;
could someone advise me how to achieve this? &lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Mar 2015 16:02:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-the-output-for-tomcat-logs-with-starttime-and/m-p/192396#M55316</guid>
      <dc:creator>lim2</dc:creator>
      <dc:date>2015-03-23T16:02:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to display the output for tomcat logs with starttime and endtime?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-the-output-for-tomcat-logs-with-starttime-and/m-p/192397#M55317</link>
      <description>&lt;P&gt;What does your input look like?&lt;/P&gt;</description>
      <pubDate>Mon, 23 Mar 2015 16:48:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-the-output-for-tomcat-logs-with-starttime-and/m-p/192397#M55317</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2015-03-23T16:48:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to display the output for tomcat logs with starttime and endtime?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-the-output-for-tomcat-logs-with-starttime-and/m-p/192398#M55318</link>
      <description>&lt;P&gt;(SEVERE OR exception OR CRITICAL OR "[error]")|rex field=_raw  "(?^\d\d-\w\w\w-\d\d\d\d\s\d\d:\d\d:\d\d.\d\d\d)\s(?.*)"| transaction detail|eval startt=min(mtime)|eval endt=max(mtime)|stats count(detail) by detail, source, host, startt, endt&lt;BR /&gt;
The above query is giving me the right starttime and endtime&lt;BR /&gt;
But count(detail) is always 1.&lt;BR /&gt;
How to get ct of events in each transaction,  5 events ? like in &lt;A href="http://docs.splunk.com/File:TransactionEx3_eventsList.png" target="_blank"&gt;http://docs.splunk.com/File:TransactionEx3_eventsList.png&lt;/A&gt; &lt;/P&gt;

&lt;P&gt;23-Mar-2015 10:28:22.299 SEVERE [tomcat-http--38] org.apache.catalina.core.StandardHostValve.custom Exception Processing ErrorPage[exceptionType=java.lang.Throwable, location=/error.jsp] ... 77 lines omitted ... &lt;BR /&gt;
23-Mar-2015 10:28:37.566 SEVERE [tomcat-http--38] org.apache.catalina.core.StandardHostValve.custom Exception Processing ErrorPage[exceptionType=java.lang.Throwable, location=/error.jsp] ... 38 lines omitted ... &lt;BR /&gt;
23-Mar-2015 10:28:50.962 SEVERE [tomcat-http--38] org.apache.catalina.core.StandardHostValve.custom Exception Processing ErrorPage[exceptionType=java.lang.Throwable, location=/error.jsp] ... 38 lines omitted ... &lt;BR /&gt;
23-Mar-2015 10:30:31.844 SEVERE [tomcat-http--38] org.apache.catalina.core.StandardHostValve.custom Exception Processing ErrorPage[exceptionType=java.lang.Throwable, location=/error.jsp] ... 38 lines omitted ... &lt;BR /&gt;
23-Mar-2015 10:31:04.643 SEVERE [tomcat-http--38] org.apache.catalina.core.StandardHostValve.custom Exception Processing ErrorPage[exceptionType=java.lang.Throwable, location=/error.jsp]&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 19:18:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-the-output-for-tomcat-logs-with-starttime-and/m-p/192398#M55318</guid>
      <dc:creator>lim2</dc:creator>
      <dc:date>2020-09-28T19:18:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to display the output for tomcat logs with starttime and endtime?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-the-output-for-tomcat-logs-with-starttime-and/m-p/192399#M55319</link>
      <description>&lt;P&gt;(SEVERE OR exception OR CRITICAL OR "[error]")|rex field=_raw "(?^dd-www-ddddsdd:dd:dd.ddd)s(?.*)"| transaction detail|eval startt=min(mtime)|eval endt=max(mtime)|table detail, source, host, startt, endt, eventcount&lt;/P&gt;</description>
      <pubDate>Sun, 29 Mar 2015 01:08:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-the-output-for-tomcat-logs-with-starttime-and/m-p/192399#M55319</guid>
      <dc:creator>lim2</dc:creator>
      <dc:date>2015-03-29T01:08:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to display the output for tomcat logs with starttime and endtime?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-the-output-for-tomcat-logs-with-starttime-and/m-p/192400#M55320</link>
      <description>&lt;P&gt;Hi @lim2&lt;/P&gt;

&lt;P&gt;You put this search in the Answer section, but didn't include any context what this was for. Did this search solve your question?&lt;/P&gt;</description>
      <pubDate>Mon, 30 Mar 2015 20:21:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-the-output-for-tomcat-logs-with-starttime-and/m-p/192400#M55320</guid>
      <dc:creator>ppablo</dc:creator>
      <dc:date>2015-03-30T20:21:49Z</dc:date>
    </item>
  </channel>
</rss>

