<?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: comparing min, max and avg of a field by host and application in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/comparing-min-max-and-avg-of-a-field-by-host-and-application/m-p/363674#M107364</link>
    <description>&lt;P&gt;what happens if you try - &lt;BR /&gt;
|stats min(field1), max(field1) ,avg(field1) by host , applicationID&lt;BR /&gt;
OR&lt;BR /&gt;
|stats min(field1), max(field1) ,avg(field1) by host , applicationID&lt;BR /&gt;
???&lt;/P&gt;</description>
    <pubDate>Mon, 02 Oct 2017 13:38:13 GMT</pubDate>
    <dc:creator>Sukisen1981</dc:creator>
    <dc:date>2017-10-02T13:38:13Z</dc:date>
    <item>
      <title>comparing min, max and avg of a field by host and application</title>
      <link>https://community.splunk.com/t5/Splunk-Search/comparing-min-max-and-avg-of-a-field-by-host-and-application/m-p/363673#M107363</link>
      <description>&lt;P&gt;Hi All, &lt;/P&gt;

&lt;P&gt;I have been working on a search query but couldn't able to get desired results. &lt;/P&gt;

&lt;P&gt;I'm looking for a search which will give me min(field1), max(field1) and avg(field1) of field1 per host per applicationID&lt;/P&gt;

&lt;P&gt;My results should have applicationID in the row, and the columns should have hosts and min, max and avg of each host &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Results&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;                                               Host1                                                             Host2                                             Host3
                        min(field1) max(field1) avg(field1)                min(field1) max(field1) avg(field1)        min(field1) max(field1) avg(field1)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;appId1&lt;/P&gt;

&lt;P&gt;appId2&lt;/P&gt;

&lt;P&gt;appId3 &lt;/P&gt;

&lt;P&gt;Any help on this is greatly appreciated &lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2017 13:29:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/comparing-min-max-and-avg-of-a-field-by-host-and-application/m-p/363673#M107363</guid>
      <dc:creator>guru865</dc:creator>
      <dc:date>2017-10-02T13:29:59Z</dc:date>
    </item>
    <item>
      <title>Re: comparing min, max and avg of a field by host and application</title>
      <link>https://community.splunk.com/t5/Splunk-Search/comparing-min-max-and-avg-of-a-field-by-host-and-application/m-p/363674#M107364</link>
      <description>&lt;P&gt;what happens if you try - &lt;BR /&gt;
|stats min(field1), max(field1) ,avg(field1) by host , applicationID&lt;BR /&gt;
OR&lt;BR /&gt;
|stats min(field1), max(field1) ,avg(field1) by host , applicationID&lt;BR /&gt;
???&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2017 13:38:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/comparing-min-max-and-avg-of-a-field-by-host-and-application/m-p/363674#M107364</guid>
      <dc:creator>Sukisen1981</dc:creator>
      <dc:date>2017-10-02T13:38:13Z</dc:date>
    </item>
    <item>
      <title>Re: comparing min, max and avg of a field by host and application</title>
      <link>https://community.splunk.com/t5/Splunk-Search/comparing-min-max-and-avg-of-a-field-by-host-and-application/m-p/363675#M107365</link>
      <description>&lt;P&gt;sorry OR&lt;BR /&gt;
|stats min(field1), max(field1) ,avg(field1) by applicationID,host&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2017 13:39:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/comparing-min-max-and-avg-of-a-field-by-host-and-application/m-p/363675#M107365</guid>
      <dc:creator>Sukisen1981</dc:creator>
      <dc:date>2017-10-02T13:39:43Z</dc:date>
    </item>
    <item>
      <title>Re: comparing min, max and avg of a field by host and application</title>
      <link>https://community.splunk.com/t5/Splunk-Search/comparing-min-max-and-avg-of-a-field-by-host-and-application/m-p/363676#M107366</link>
      <description>&lt;P&gt;Thanks for your response. &lt;/P&gt;

&lt;P&gt;This doesn't give me the results in row vs column. I'm looking for applicationId in rows and host values in cloumn. Each host should have min, max and avg values. &lt;BR /&gt;
                       host1                        host2&lt;BR /&gt;
appID1      min, max, avg           min,max,avg &lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2017 13:51:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/comparing-min-max-and-avg-of-a-field-by-host-and-application/m-p/363676#M107366</guid>
      <dc:creator>guru865</dc:creator>
      <dc:date>2017-10-02T13:51:28Z</dc:date>
    </item>
    <item>
      <title>Re: comparing min, max and avg of a field by host and application</title>
      <link>https://community.splunk.com/t5/Splunk-Search/comparing-min-max-and-avg-of-a-field-by-host-and-application/m-p/363677#M107367</link>
      <description>&lt;P&gt;@guru865, How many hosts can you have?&lt;/P&gt;

&lt;P&gt;You can created three panels one for each host:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;yourbasesearch&amp;gt; host=host1
|stats min(field1), max(field1) ,avg(field1) by applicationID

&amp;lt;yourbasesearch&amp;gt; host=host2
|stats min(field1), max(field1) ,avg(field1) by applicationID

&amp;lt;yourbasesearch&amp;gt; host=host3
|stats min(field1), max(field1) ,avg(field1) by applicationID
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If possible please add a screenshot or mock table of the output you need.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2017 13:58:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/comparing-min-max-and-avg-of-a-field-by-host-and-application/m-p/363677#M107367</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-10-02T13:58:13Z</dc:date>
    </item>
    <item>
      <title>Re: comparing min, max and avg of a field by host and application</title>
      <link>https://community.splunk.com/t5/Splunk-Search/comparing-min-max-and-avg-of-a-field-by-host-and-application/m-p/363678#M107368</link>
      <description>&lt;P&gt;if you did &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;   ...|chart min(field1) as min max(field1) as max avg(field1) as avg by applicationID host
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;does that get you what you need? each column should be named something like &lt;STRONG&gt;min: host1&lt;/STRONG&gt;; &lt;STRONG&gt;max: host1&lt;/STRONG&gt;; etc. it wouldn't be multi-tiered column headers.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2017 14:06:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/comparing-min-max-and-avg-of-a-field-by-host-and-application/m-p/363678#M107368</guid>
      <dc:creator>cmerriman</dc:creator>
      <dc:date>2017-10-02T14:06:41Z</dc:date>
    </item>
    <item>
      <title>Re: comparing min, max and avg of a field by host and application</title>
      <link>https://community.splunk.com/t5/Splunk-Search/comparing-min-max-and-avg-of-a-field-by-host-and-application/m-p/363679#M107369</link>
      <description>&lt;P&gt;Thanks Nilay, but there are 36 hosts which i'm looking for &lt;/P&gt;

&lt;P&gt;I've been trying to add mock table, but somehow when I post it, it looks all messed up. Let me try again &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Host1           Host2       
Min MaxAvg   MinMax Avg
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;AppId1&lt;BR /&gt;&lt;BR /&gt;
AppId2&lt;BR /&gt;&lt;BR /&gt;
AppId3                      &lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2017 14:17:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/comparing-min-max-and-avg-of-a-field-by-host-and-application/m-p/363679#M107369</guid>
      <dc:creator>guru865</dc:creator>
      <dc:date>2017-10-02T14:17:52Z</dc:date>
    </item>
    <item>
      <title>Re: comparing min, max and avg of a field by host and application</title>
      <link>https://community.splunk.com/t5/Splunk-Search/comparing-min-max-and-avg-of-a-field-by-host-and-application/m-p/363680#M107370</link>
      <description>&lt;P&gt;Thanks for your response. &lt;/P&gt;

&lt;P&gt;I tried   ......| chart min(field1) as min, max(field1) as max , avg(field1) as avg over appId by host. &lt;/P&gt;

&lt;P&gt;This gives me the result but rather than having host name for each min, max and avg value, I want that listed only once in the column and should display the min,max and avg of that server under sub comlumns &lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2017 14:22:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/comparing-min-max-and-avg-of-a-field-by-host-and-application/m-p/363680#M107370</guid>
      <dc:creator>guru865</dc:creator>
      <dc:date>2017-10-02T14:22:01Z</dc:date>
    </item>
    <item>
      <title>Re: comparing min, max and avg of a field by host and application</title>
      <link>https://community.splunk.com/t5/Splunk-Search/comparing-min-max-and-avg-of-a-field-by-host-and-application/m-p/363681#M107371</link>
      <description>&lt;P&gt;there is no way to have "sub-columns" in Splunk like there is in Excel. This is, in my understanding, the closest way to do it.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2017 14:40:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/comparing-min-max-and-avg-of-a-field-by-host-and-application/m-p/363681#M107371</guid>
      <dc:creator>cmerriman</dc:creator>
      <dc:date>2017-10-02T14:40:40Z</dc:date>
    </item>
    <item>
      <title>Re: comparing min, max and avg of a field by host and application</title>
      <link>https://community.splunk.com/t5/Splunk-Search/comparing-min-max-and-avg-of-a-field-by-host-and-application/m-p/363682#M107372</link>
      <description>&lt;P&gt;Thank you. But the search query ...|chart min(field1) as min max(field1) as max avg(field1) as avg by applicationID host  is not giving the total results. there are more than 20 hosts but I see only 10 of them in the results and others are complied with the name min(field1):OTHER max(field1):OTHER and avg(field1):OTHER. &lt;/P&gt;

&lt;P&gt;Is there any way I can see all the values of each individual host &lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2017 15:08:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/comparing-min-max-and-avg-of-a-field-by-host-and-application/m-p/363682#M107372</guid>
      <dc:creator>guru865</dc:creator>
      <dc:date>2017-10-02T15:08:07Z</dc:date>
    </item>
    <item>
      <title>Re: comparing min, max and avg of a field by host and application</title>
      <link>https://community.splunk.com/t5/Splunk-Search/comparing-min-max-and-avg-of-a-field-by-host-and-application/m-p/363683#M107373</link>
      <description>&lt;P&gt;I got that by adding limit=0 at the end of the search query. Thankyou&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2017 15:10:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/comparing-min-max-and-avg-of-a-field-by-host-and-application/m-p/363683#M107373</guid>
      <dc:creator>guru865</dc:creator>
      <dc:date>2017-10-02T15:10:53Z</dc:date>
    </item>
    <item>
      <title>Re: comparing min, max and avg of a field by host and application</title>
      <link>https://community.splunk.com/t5/Splunk-Search/comparing-min-max-and-avg-of-a-field-by-host-and-application/m-p/363684#M107374</link>
      <description>&lt;P&gt;Try this...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;base search&amp;gt;
| stats min(Field1) as min_field1, max(Field1) as max_field1, avg(Field1) as avg_field1 by appID, Host
| eval min_{Host} = min_field1
| eval max_{Host} = max_field1
| eval avg_{Host} = avg_field1
| fields - Host, min_field1, max_field1, avg_field1
| stats values(*) as * by appID
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The curly braces in the eval will create the sub-columns.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2017 11:14:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/comparing-min-max-and-avg-of-a-field-by-host-and-application/m-p/363684#M107374</guid>
      <dc:creator>andre_tucker</dc:creator>
      <dc:date>2017-10-03T11:14:47Z</dc:date>
    </item>
  </channel>
</rss>

