<?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 to combine 2 searches to get show values and percentage of host and instance fields? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-2-searches-to-get-show-values-and-percentage-of/m-p/368447#M108591</link>
    <description>&lt;P&gt;you could do:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=windows sourcetype="Perfmon:Free Disk Space" role=ABC counter="Free Megabytes" instance!=_Total| eval Value=(Value/1024)|eval Value= round(Value,2)|chart values(Value) by host, instance|join type=left host [search index=windows sourcetype="Perfmon:Free Disk Space" role=ABC counter="% Free Space" instance!=_Total|eval Value= round(Value,2)|chart values(Value) by host,instance]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;but that has limitations with the join, or you could try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=windows sourcetype="Perfmon:Free Disk Space" role=ABC (counter="Free Megabytes" OR counter="% Free Space") instance!=_Total    |eval Value=if(counter="Free Megabytes",round((Value/1024),2),round(Value,2))
|chart values(Value) by host, instance
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 21 Mar 2017 15:06:13 GMT</pubDate>
    <dc:creator>cmerriman</dc:creator>
    <dc:date>2017-03-21T15:06:13Z</dc:date>
    <item>
      <title>How to combine 2 searches to get show values and percentage of host and instance fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-2-searches-to-get-show-values-and-percentage-of/m-p/368445#M108589</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have 2 searches, for 1st output is values (2GB) and other gives output as percent (2%) . &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=windows sourcetype="Perfmon:Free Disk Space" role=ABC  counter="Free Megabytes"  instance!=_Total| eval Value=(Value/1024)|eval Value= round(Value,2)|chart values(Value) by host, instance

index=windows sourcetype="Perfmon:Free Disk Space" role=ABC   counter="% Free Space" instance!=_Total|eval Value= round(Value,2)|chart values(Value)  by  host,instance
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I want output to show values as well as percent for the host and instance (C/D)...&lt;BR /&gt;
Any ideas will be appreciated &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2017 14:35:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-2-searches-to-get-show-values-and-percentage-of/m-p/368445#M108589</guid>
      <dc:creator>shreyasathavale</dc:creator>
      <dc:date>2017-03-21T14:35:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine 2 searches to get show values and percentage of host and instance fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-2-searches-to-get-show-values-and-percentage-of/m-p/368446#M108590</link>
      <description>&lt;P&gt;hi shreyasathavale,&lt;BR /&gt;
try something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=windows sourcetype="Perfmon:Free Disk Space" role=ABC counter="Free Megabytes" instance!=_Total 
| eval Value=round(Value/1024,2)
| stats values(Value) AS "Free Megabytes" by host, instance
| append [ search 
   index=windows sourcetype="Perfmon:Free Disk Space" role=ABC counter="% Free Space" instance!=_Total 
   | eval Value=round(Value,2)
   | stats values(Value) AS "% Free Space" by host, instance
   ]
| stats values("Free Megabytes") AS "Free Megabytes" values("% Free Space") AS "% Free Space" by host, instance
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2017 15:02:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-2-searches-to-get-show-values-and-percentage-of/m-p/368446#M108590</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-03-21T15:02:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine 2 searches to get show values and percentage of host and instance fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-2-searches-to-get-show-values-and-percentage-of/m-p/368447#M108591</link>
      <description>&lt;P&gt;you could do:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=windows sourcetype="Perfmon:Free Disk Space" role=ABC counter="Free Megabytes" instance!=_Total| eval Value=(Value/1024)|eval Value= round(Value,2)|chart values(Value) by host, instance|join type=left host [search index=windows sourcetype="Perfmon:Free Disk Space" role=ABC counter="% Free Space" instance!=_Total|eval Value= round(Value,2)|chart values(Value) by host,instance]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;but that has limitations with the join, or you could try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=windows sourcetype="Perfmon:Free Disk Space" role=ABC (counter="Free Megabytes" OR counter="% Free Space") instance!=_Total    |eval Value=if(counter="Free Megabytes",round((Value/1024),2),round(Value,2))
|chart values(Value) by host, instance
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 21 Mar 2017 15:06:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-2-searches-to-get-show-values-and-percentage-of/m-p/368447#M108591</guid>
      <dc:creator>cmerriman</dc:creator>
      <dc:date>2017-03-21T15:06:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine 2 searches to get show values and percentage of host and instance fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-2-searches-to-get-show-values-and-percentage-of/m-p/368448#M108592</link>
      <description>&lt;P&gt;Try like this.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=windows sourcetype="Perfmon:Free Disk Space" role=ABC counter="Free Megabytes" OR counter="% Free Space" instance!=_Total|eval Value= round(Value/1024,2) | eval instance=instance.":".counter|chart values(Value) by host, instance
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 21 Mar 2017 15:08:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-2-searches-to-get-show-values-and-percentage-of/m-p/368448#M108592</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-03-21T15:08:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine 2 searches to get show values and percentage of host and instance fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-2-searches-to-get-show-values-and-percentage-of/m-p/368449#M108593</link>
      <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=windows sourcetype="Perfmon:Free Disk Space" role=ABC  (counter="Free Megabytes" OR counter="% Free Space")  instance!=_Total
| eval Value=if((counter="Free Megabytes", Value/1024, round(Value,2)) | chart values(Value) by host, instance
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 21 Mar 2017 18:43:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-2-searches-to-get-show-values-and-percentage-of/m-p/368449#M108593</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-03-21T18:43:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine 2 searches to get show values and percentage of host and instance fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-2-searches-to-get-show-values-and-percentage-of/m-p/368450#M108594</link>
      <description>&lt;P&gt;Thanks Guiseppe,  I was going for "join" but append is anytime better &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Mar 2017 06:09:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-2-searches-to-get-show-values-and-percentage-of/m-p/368450#M108594</guid>
      <dc:creator>shreyasathavale</dc:creator>
      <dc:date>2017-03-22T06:09:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine 2 searches to get show values and percentage of host and instance fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-2-searches-to-get-show-values-and-percentage-of/m-p/368451#M108595</link>
      <description>&lt;P&gt;The &lt;CODE&gt;append&lt;/CODE&gt; command has the same downsides as &lt;CODE&gt;join&lt;/CODE&gt; does.  Did you try any of the answers that do not use either?&lt;/P&gt;</description>
      <pubDate>Wed, 22 Mar 2017 15:22:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-2-searches-to-get-show-values-and-percentage-of/m-p/368451#M108595</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-03-22T15:22:05Z</dc:date>
    </item>
  </channel>
</rss>

