<?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: grouping by host in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/grouping-by-host/m-p/343602#M160745</link>
    <description>&lt;P&gt;maybe, instead of delta, you can give it a try for stats dc (distinct count)- &lt;/P&gt;

&lt;PRE&gt;index=ck sourcetype=a_log host = hkv earliest=-6h | stats dc(du) as useddiff by host | fillnull value=0.00 useddiff | eval velo=useddiff/15| table time du useddiff velo &lt;/PRE&gt;</description>
    <pubDate>Mon, 12 Jun 2017 11:49:41 GMT</pubDate>
    <dc:creator>inventsekar</dc:creator>
    <dc:date>2017-06-12T11:49:41Z</dc:date>
    <item>
      <title>grouping by host</title>
      <link>https://community.splunk.com/t5/Splunk-Search/grouping-by-host/m-p/343599#M160742</link>
      <description>&lt;P&gt;I have to calculate the change of a field(xyz) over the past 6 hours on a per host basis. I have calculated the same for a single host specified in the query itself. The code is as follows:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;index=ck sourcetype=a_log host = hkv earliest=-6h | delta du as useddiff |&lt;BR /&gt;
fillnull value=0.00 useddiff | eval velo=useddiff/15 | table time du useddiff velo&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;I now need to do the same for multiple hosts separately and display a timechart of all of the hosts together. Kindly tell me how the same work can be done host wise.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jun 2017 10:26:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/grouping-by-host/m-p/343599#M160742</guid>
      <dc:creator>AshimaE</dc:creator>
      <dc:date>2017-06-12T10:26:49Z</dc:date>
    </item>
    <item>
      <title>Re: grouping by host</title>
      <link>https://community.splunk.com/t5/Splunk-Search/grouping-by-host/m-p/343600#M160743</link>
      <description>&lt;P&gt;please check this - &lt;BR /&gt;
&lt;PRE&gt;index=ck sourcetype=a_log host = hkv earliest=-6h | delta du as useddiff |&lt;BR /&gt;
fillnull value=0.00 useddiff | timechart eval(useddiff/15) by host &lt;/PRE&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jun 2017 11:31:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/grouping-by-host/m-p/343600#M160743</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2017-06-12T11:31:18Z</dc:date>
    </item>
    <item>
      <title>Re: grouping by host</title>
      <link>https://community.splunk.com/t5/Splunk-Search/grouping-by-host/m-p/343601#M160744</link>
      <description>&lt;P&gt;the problem is since I have more than 1 host and i need the difference for the same host or a zero rather than calculating a difference between the last value of the previous host and the first value of the next host&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jun 2017 11:34:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/grouping-by-host/m-p/343601#M160744</guid>
      <dc:creator>AshimaE</dc:creator>
      <dc:date>2017-06-12T11:34:47Z</dc:date>
    </item>
    <item>
      <title>Re: grouping by host</title>
      <link>https://community.splunk.com/t5/Splunk-Search/grouping-by-host/m-p/343602#M160745</link>
      <description>&lt;P&gt;maybe, instead of delta, you can give it a try for stats dc (distinct count)- &lt;/P&gt;

&lt;PRE&gt;index=ck sourcetype=a_log host = hkv earliest=-6h | stats dc(du) as useddiff by host | fillnull value=0.00 useddiff | eval velo=useddiff/15| table time du useddiff velo &lt;/PRE&gt;</description>
      <pubDate>Mon, 12 Jun 2017 11:49:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/grouping-by-host/m-p/343602#M160745</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2017-06-12T11:49:41Z</dc:date>
    </item>
    <item>
      <title>Re: grouping by host</title>
      <link>https://community.splunk.com/t5/Splunk-Search/grouping-by-host/m-p/343603#M160746</link>
      <description>&lt;P&gt;But this defeats the purpose since I actually need the difference between the two rather consecutive rows belonging to the same host only.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jun 2017 13:24:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/grouping-by-host/m-p/343603#M160746</guid>
      <dc:creator>AshimaE</dc:creator>
      <dc:date>2017-06-12T13:24:27Z</dc:date>
    </item>
    <item>
      <title>Re: grouping by host</title>
      <link>https://community.splunk.com/t5/Splunk-Search/grouping-by-host/m-p/343604#M160747</link>
      <description>&lt;P&gt;Give this a try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=ck sourcetype=a_log host=* earliest=-6h 
| sort 0 _time host
| streamstats current=f window=1 values(du) as prevdu by host
| eval useddiff=coalesce(du-prevdu,0.00) 
| eval velo=useddiff/15 | table _time du useddiff velo
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 12 Jun 2017 14:28:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/grouping-by-host/m-p/343604#M160747</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-06-12T14:28:35Z</dc:date>
    </item>
  </channel>
</rss>

