<?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 Display day wise results for a stats count in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Display-day-wise-results-for-a-stats-count/m-p/303941#M91405</link>
    <description>&lt;P&gt;Hello&lt;/P&gt;

&lt;P&gt;I have a below query.&lt;BR /&gt;
sourcetype=ProcessStart OR sourcetype=ProcessEnd | transaction RunID | table RunID, Robot, host, duration &lt;/P&gt;

&lt;P&gt;I need to count the sum(duration) by host and I want the result to be displayed day wise. &lt;/P&gt;

&lt;P&gt;The result should be something like, Day1, host1, duration&lt;BR /&gt;
                                                                  Day1, host2, duration&lt;BR /&gt;
                                                                  Day2, host1, duration&lt;BR /&gt;
                                                                  Day2, host2, duration&lt;/P&gt;

&lt;P&gt;How can I do that? Timechard sum(duration) span=1d works, but I need the duration to be calculated according to the host. How do I do that?&lt;/P&gt;

&lt;P&gt;Thanks&lt;BR /&gt;
Maria Arokiaraj&lt;/P&gt;</description>
    <pubDate>Fri, 12 Jan 2018 11:39:08 GMT</pubDate>
    <dc:creator>maria2691</dc:creator>
    <dc:date>2018-01-12T11:39:08Z</dc:date>
    <item>
      <title>Display day wise results for a stats count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Display-day-wise-results-for-a-stats-count/m-p/303941#M91405</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;

&lt;P&gt;I have a below query.&lt;BR /&gt;
sourcetype=ProcessStart OR sourcetype=ProcessEnd | transaction RunID | table RunID, Robot, host, duration &lt;/P&gt;

&lt;P&gt;I need to count the sum(duration) by host and I want the result to be displayed day wise. &lt;/P&gt;

&lt;P&gt;The result should be something like, Day1, host1, duration&lt;BR /&gt;
                                                                  Day1, host2, duration&lt;BR /&gt;
                                                                  Day2, host1, duration&lt;BR /&gt;
                                                                  Day2, host2, duration&lt;/P&gt;

&lt;P&gt;How can I do that? Timechard sum(duration) span=1d works, but I need the duration to be calculated according to the host. How do I do that?&lt;/P&gt;

&lt;P&gt;Thanks&lt;BR /&gt;
Maria Arokiaraj&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jan 2018 11:39:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Display-day-wise-results-for-a-stats-count/m-p/303941#M91405</guid>
      <dc:creator>maria2691</dc:creator>
      <dc:date>2018-01-12T11:39:08Z</dc:date>
    </item>
    <item>
      <title>Re: Display day wise results for a stats count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Display-day-wise-results-for-a-stats-count/m-p/303942#M91406</link>
      <description>&lt;P&gt;hey try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=ProcessStart OR sourcetype=ProcessEnd | transaction RunID | table _time RunID, Robot, host, duration | bin _time span=1d  | stats sum(duration) by _time host | sort- _time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;let me know if this helps!&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jan 2018 11:48:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Display-day-wise-results-for-a-stats-count/m-p/303942#M91406</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-01-12T11:48:02Z</dc:date>
    </item>
    <item>
      <title>Re: Display day wise results for a stats count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Display-day-wise-results-for-a-stats-count/m-p/303943#M91407</link>
      <description>&lt;P&gt;Hello @mayurr98&lt;/P&gt;

&lt;P&gt;I tried this one already with bucket command and now with bin also as you have suggested.&lt;BR /&gt;
For some reason, I am not getting any results out of these queries &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; &lt;/P&gt;</description>
      <pubDate>Fri, 12 Jan 2018 12:25:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Display-day-wise-results-for-a-stats-count/m-p/303943#M91407</guid>
      <dc:creator>maria2691</dc:creator>
      <dc:date>2018-01-12T12:25:22Z</dc:date>
    </item>
    <item>
      <title>Re: Display day wise results for a stats count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Display-day-wise-results-for-a-stats-count/m-p/303944#M91408</link>
      <description>&lt;P&gt;hey can you try this as &lt;CODE&gt;| table _time RunID, Robot, host, duration&lt;/CODE&gt; seems irrelavent. Also try below query for last 7 days or more. I tried in a test environment the query is working as long as you have enough data.Specify &lt;CODE&gt;your_index&lt;/CODE&gt; at start of the search&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=your_index  sourcetype=ProcessStart OR sourcetype=ProcessEnd | transaction RunID | bin _time span=1d  | stats sum(duration) by _time host | sort- _time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If above query does not work then try &lt;CODE&gt;sourcetype=ProcessStart OR sourcetype=ProcessEnd | transaction RunID&lt;/CODE&gt; and see if you get any output. If you are getting output then the above query must work. &lt;/P&gt;</description>
      <pubDate>Fri, 12 Jan 2018 12:31:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Display-day-wise-results-for-a-stats-count/m-p/303944#M91408</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-01-12T12:31:25Z</dc:date>
    </item>
    <item>
      <title>Re: Display day wise results for a stats count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Display-day-wise-results-for-a-stats-count/m-p/303945#M91409</link>
      <description>&lt;P&gt;Thanks @mayurr98&lt;/P&gt;

&lt;P&gt;It worked. Understood that the Table command in between caused the issue &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jan 2018 13:29:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Display-day-wise-results-for-a-stats-count/m-p/303945#M91409</guid>
      <dc:creator>maria2691</dc:creator>
      <dc:date>2018-01-12T13:29:20Z</dc:date>
    </item>
  </channel>
</rss>

