<?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 Transaction By Day in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Transaction-By-Day/m-p/139495#M38361</link>
    <description>&lt;P&gt;Events are looked like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;2/4/2014 00:00:01 –Something else
2/4/2014 04:00:01 – Restarted
2/4/2014 05:59:59  - Something else
2/4/2014 08:59:59  - Something else
2/4/2014 10:00:01 – Paused
2/4/2014 13:59:59  - Something else
2/4/2014 13:59:59  - Something else
2/4/2014 14:00:01 – Restarted
2/4/2014 15:59:59  - Something else
2/4/2014 16:59:59  - Something else
2/4/2014 17:00:01 – Paused
2/4/2014 18:59:59  - Something else
2/4/2014 19:59:59  - Something else
2/4/2014 20:00:01 – Restarted
2/4/2014 23:59:59  - Something else


2/5/2014 00:00:01 –Something else
2/5/2014 04:00:01 – Paused
2/5/2014 05:59:59  - Something else
2/5/2014 08:59:59  - Something else 
2/5/2014 13:59:59  - Something else
2/5/2014 13:59:59  - Something else
2/5/2014 14:00:01 – Restarted
2/5/2014 15:59:59  - Something else
2/5/2014 16:59:59  - Something else
2/5/2014 17:00:01 – Paused
2/5/2014 18:59:59  - Something else
2/5/2014 19:59:59  - Something else
2/5/2014 20:00:01 – Restarted
2/5/2014 23:59:59  - Something else
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And I am trying to get total paused time by Day.&lt;/P&gt;

&lt;P&gt;So, my results would be:&lt;/P&gt;

&lt;P&gt;2/4/2014 – 7h&lt;/P&gt;

&lt;P&gt;2/5/2014 – 13 h&lt;/P&gt;

&lt;P&gt;I tried following but could not get by Day, events with different days are overlapping.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;index=my_index  earliest=-2d  ("Paused" OR "Restarted")| eval Day=strftime(_time,"%Y-%m-%d")| transaction startswith="Paused" endswith="Restarted" | stats sum(duration) as PausedTime by Day&lt;/STRONG&gt; &lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 15:48:51 GMT</pubDate>
    <dc:creator>sanjay_shrestha</dc:creator>
    <dc:date>2020-09-28T15:48:51Z</dc:date>
    <item>
      <title>Transaction By Day</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Transaction-By-Day/m-p/139495#M38361</link>
      <description>&lt;P&gt;Events are looked like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;2/4/2014 00:00:01 –Something else
2/4/2014 04:00:01 – Restarted
2/4/2014 05:59:59  - Something else
2/4/2014 08:59:59  - Something else
2/4/2014 10:00:01 – Paused
2/4/2014 13:59:59  - Something else
2/4/2014 13:59:59  - Something else
2/4/2014 14:00:01 – Restarted
2/4/2014 15:59:59  - Something else
2/4/2014 16:59:59  - Something else
2/4/2014 17:00:01 – Paused
2/4/2014 18:59:59  - Something else
2/4/2014 19:59:59  - Something else
2/4/2014 20:00:01 – Restarted
2/4/2014 23:59:59  - Something else


2/5/2014 00:00:01 –Something else
2/5/2014 04:00:01 – Paused
2/5/2014 05:59:59  - Something else
2/5/2014 08:59:59  - Something else 
2/5/2014 13:59:59  - Something else
2/5/2014 13:59:59  - Something else
2/5/2014 14:00:01 – Restarted
2/5/2014 15:59:59  - Something else
2/5/2014 16:59:59  - Something else
2/5/2014 17:00:01 – Paused
2/5/2014 18:59:59  - Something else
2/5/2014 19:59:59  - Something else
2/5/2014 20:00:01 – Restarted
2/5/2014 23:59:59  - Something else
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And I am trying to get total paused time by Day.&lt;/P&gt;

&lt;P&gt;So, my results would be:&lt;/P&gt;

&lt;P&gt;2/4/2014 – 7h&lt;/P&gt;

&lt;P&gt;2/5/2014 – 13 h&lt;/P&gt;

&lt;P&gt;I tried following but could not get by Day, events with different days are overlapping.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;index=my_index  earliest=-2d  ("Paused" OR "Restarted")| eval Day=strftime(_time,"%Y-%m-%d")| transaction startswith="Paused" endswith="Restarted" | stats sum(duration) as PausedTime by Day&lt;/STRONG&gt; &lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:48:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Transaction-By-Day/m-p/139495#M38361</guid>
      <dc:creator>sanjay_shrestha</dc:creator>
      <dc:date>2020-09-28T15:48:51Z</dc:date>
    </item>
    <item>
      <title>Re: Transaction By Day</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Transaction-By-Day/m-p/139496#M38362</link>
      <description>&lt;P&gt;Splunk contains date metadata, so you do not need to calculate the day.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=my_index earliest=-2d ("Paused" OR "Restarted")| transaction date_mday date_month startswith="Paused" endswith="Restarted" | stats sum(duration) as PausedTime by date_mday date_month
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 06 Feb 2014 17:33:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Transaction-By-Day/m-p/139496#M38362</guid>
      <dc:creator>araitz</dc:creator>
      <dc:date>2014-02-06T17:33:54Z</dc:date>
    </item>
    <item>
      <title>Re: Transaction By Day</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Transaction-By-Day/m-p/139497#M38363</link>
      <description>&lt;P&gt;Thanks. It worked.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Feb 2014 18:02:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Transaction-By-Day/m-p/139497#M38363</guid>
      <dc:creator>sanjay_shrestha</dc:creator>
      <dc:date>2014-02-06T18:02:53Z</dc:date>
    </item>
  </channel>
</rss>

