<?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 can I get the result ? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-get-the-result/m-p/408918#M167868</link>
    <description>&lt;P&gt;device="/dev/vda1 or device="/dev/vdb2 or device="/dev/sdb1 ...... and so on &lt;BR /&gt;
so can not used to if(device="/dev/vda1",metric_value,null()) &lt;BR /&gt;
I want to find rank...over() like oracle&lt;/P&gt;</description>
    <pubDate>Wed, 15 Aug 2018 14:27:46 GMT</pubDate>
    <dc:creator>flzhang132</dc:creator>
    <dc:date>2018-08-15T14:27:46Z</dc:date>
    <item>
      <title>How can I get the result ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-get-the-result/m-p/408916#M167866</link>
      <description>&lt;P&gt;How can I get the result ? thanks ！&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/5569i923F4A8747D1A7B7/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Aug 2018 10:47:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-get-the-result/m-p/408916#M167866</guid>
      <dc:creator>flzhang132</dc:creator>
      <dc:date>2018-08-15T10:47:53Z</dc:date>
    </item>
    <item>
      <title>Re: How can I get the result ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-get-the-result/m-p/408917#M167867</link>
      <description>&lt;P&gt;@flzhang132,&lt;/P&gt;

&lt;P&gt;Try this and let's know&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="your index" "other search terms"
|eval time=strftime(_time,"%d/%m/%Y")
|fields time,type,host,device,metric_value| fillnull value="NA"
|stats avg(eval(if(type="cpu",metric_value,null()))) as cpu,
  avg(eval(if(type="mem",metric_value,null()))) as mem,
  avg(eval(if(device="/dev/vda1",metric_value,null()))) as diskusage1,
  avg(eval(if(device="/dev/vdb",metric_value,null()))) as diskusage2,
  values(host) as host,values(time) as time by type,device
|fields - type,device|replace NA with ""
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Sorry not tested.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Aug 2018 12:29:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-get-the-result/m-p/408917#M167867</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2018-08-15T12:29:34Z</dc:date>
    </item>
    <item>
      <title>Re: How can I get the result ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-get-the-result/m-p/408918#M167868</link>
      <description>&lt;P&gt;device="/dev/vda1 or device="/dev/vdb2 or device="/dev/sdb1 ...... and so on &lt;BR /&gt;
so can not used to if(device="/dev/vda1",metric_value,null()) &lt;BR /&gt;
I want to find rank...over() like oracle&lt;/P&gt;</description>
      <pubDate>Wed, 15 Aug 2018 14:27:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-get-the-result/m-p/408918#M167868</guid>
      <dc:creator>flzhang132</dc:creator>
      <dc:date>2018-08-15T14:27:46Z</dc:date>
    </item>
    <item>
      <title>Re: How can I get the result ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-get-the-result/m-p/408919#M167869</link>
      <description>&lt;P&gt;The above is exactly to match your requirement. The easy solution is &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index="your index" "other search terms"
 |eval time=strftime(_time,"%d/%m/%Y")
 |fields time,type,host,device,metric_value| fillnull value="NA"
 |stats avg(metric_value) as metric_value , values(host) as host,values(time) as time by type,device
 |replace NA with ""
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and you could use chart func(value) over something by this&lt;/P&gt;</description>
      <pubDate>Wed, 15 Aug 2018 14:55:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-get-the-result/m-p/408919#M167869</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2018-08-15T14:55:14Z</dc:date>
    </item>
    <item>
      <title>Re: How can I get the result ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-get-the-result/m-p/408920#M167870</link>
      <description>&lt;P&gt;How frequently do you collect these metrics for each host? &lt;/P&gt;</description>
      <pubDate>Wed, 15 Aug 2018 15:35:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-get-the-result/m-p/408920#M167870</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2018-08-15T15:35:52Z</dc:date>
    </item>
    <item>
      <title>Re: How can I get the result ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-get-the-result/m-p/408921#M167871</link>
      <description>&lt;P&gt;yes , there are many hosts ,and each hosts have vary of device metrics &lt;/P&gt;</description>
      <pubDate>Thu, 16 Aug 2018 00:20:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-get-the-result/m-p/408921#M167871</guid>
      <dc:creator>flzhang132</dc:creator>
      <dc:date>2018-08-16T00:20:16Z</dc:date>
    </item>
    <item>
      <title>Re: How can I get the result ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-get-the-result/m-p/408922#M167872</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/5568i78696DFCCF013198/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Aug 2018 00:52:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-get-the-result/m-p/408922#M167872</guid>
      <dc:creator>flzhang132</dc:creator>
      <dc:date>2018-08-16T00:52:31Z</dc:date>
    </item>
  </channel>
</rss>

