<?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: Perfmon:Free Disk Space  instance=C:  chart in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/Perfmon-Free-Disk-Space-instance-C-chart/m-p/360420#M5860</link>
    <description>&lt;P&gt;1) good idea&lt;/P&gt;

&lt;P&gt;2) do you have any idea how can i bring this &lt;CODE&gt;host."-".instance&lt;/CODE&gt; information as a label on chart? i try to represent it with bar grafik.&lt;/P&gt;

&lt;P&gt;3) i try to colorise chart bars.its look like so. if you set the information in a variable named range.&lt;BR /&gt;
how can i use it for colouration&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;   &amp;lt;option name="charting.legend.masterLegend"&amp;gt;&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.axisTitleY.text"&amp;gt;Usage by Percent&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.chart"&amp;gt;column&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.legend.labels"&amp;gt;[redCritical,yellowWarning,greenOK]&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.legend.placement"&amp;gt;bottom&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.seriesColors"&amp;gt;[0xFF0000,0xFFFF00,0x00FF00]&amp;lt;/option&amp;gt;
      &amp;lt;/chart&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 10 Aug 2017 12:27:38 GMT</pubDate>
    <dc:creator>karakutu</dc:creator>
    <dc:date>2017-08-10T12:27:38Z</dc:date>
    <item>
      <title>Perfmon:Free Disk Space  instance=C:  chart</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Perfmon-Free-Disk-Space-instance-C-chart/m-p/360418#M5858</link>
      <description>&lt;P&gt;i can create chart for volume status  of  C: logicalpartition&lt;BR /&gt;
how can i bring in the some chart also the status of D partition.&lt;/P&gt;

&lt;P&gt;so that mean i should related to any host C and D partition. how can i do it.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=main sourcetype="Perfmon:Free Disk Space"  instance="C:"   | chart latest(Value) as Valuex by host |eval PercentFree = 100 - Valuex
    | eval redCritical   = if(PercentFree  &amp;gt;= 86,PercentFree  ,0) 
    | eval yellowWarning = if(PercentFree  &amp;gt; 76 AND PercentFree &amp;lt;=85,PercentFree  ,0) 
    | eval  greenOK= if(PercentFree  &amp;lt; 75,PercentFree  ,0) 
    | table host,redCritical,yellowWarning,greenOK
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 09 Aug 2017 13:53:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Perfmon-Free-Disk-Space-instance-C-chart/m-p/360418#M5858</guid>
      <dc:creator>karakutu</dc:creator>
      <dc:date>2017-08-09T13:53:49Z</dc:date>
    </item>
    <item>
      <title>Re: Perfmon:Free Disk Space  instance=C:  chart</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Perfmon-Free-Disk-Space-instance-C-chart/m-p/360419#M5859</link>
      <description>&lt;P&gt;@karakutu, Hopefully you are looking for the following (please try out and confirm):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=main sourcetype="Perfmon:Free Disk Space" ( instance="C:"  OR  instance="D:") 
 | stats latest(Value) as Valuex by host, instance 
 | eval PercentUsed = 100 - Valuex
 | eval range=case(PercentUsed&amp;gt;=86,"critical",PercentUsed&amp;gt;=76 AND PercentUsed&amp;lt;86, "severe", PercentUsed&amp;lt;75,"low",true(),"critical") 
 | table host,instance,PercentUsed,range
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Some changes to your query:&lt;BR /&gt;
1) PercentFree field should actually be name PercentUsed to avoid confusion. &lt;BR /&gt;
2) Changed from &lt;CODE&gt;chart&lt;/CODE&gt; to &lt;CODE&gt;stats&lt;/CODE&gt; command to allow multiple split. You can do something similar with chart but you would need to create a new field using eval (for example | eval key= host."-".instance | chart last(Value) as Valuex by Key)&lt;BR /&gt;
3) Created single case statement to create range based on value. (optional, you can retain your existing if() based evals in case that is your use case).&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;[Updated Answer] Added details as per further questions/clarifications&lt;/P&gt;

&lt;P&gt;2) Your query with chart&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  index=main sourcetype="Perfmon:Free Disk Space" ( instance="C:"  OR  instance="D:")
 | eval key= host."-".instance
 | chart latest(Value) as Valuex by key
 | eval PercentUsed = 100 - Valuex
 | eval redCritical   = if(PercentUsed &amp;gt;= 86,PercentUsed ,0) 
 | eval yellowWarning = if(PercentUsed &amp;gt; 76 AND PercentUsed &amp;lt;=85,PercentUsed ,0) 
 | eval  greenOK= if(PercentUsed &amp;lt; 75,PercentUsed ,0) 
 | table host,redCritical,yellowWarning,greenOK
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;3) You need to use charting.fieldColors since you know the field names&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;option name="charting.fieldColors"&amp;gt;{"redCritical": 0xFF0000, "yellowWarning": 0xFFFF00, "greenOK": 0x00FF00}
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 09 Aug 2017 17:35:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Perfmon-Free-Disk-Space-instance-C-chart/m-p/360419#M5859</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-08-09T17:35:42Z</dc:date>
    </item>
    <item>
      <title>Re: Perfmon:Free Disk Space  instance=C:  chart</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Perfmon-Free-Disk-Space-instance-C-chart/m-p/360420#M5860</link>
      <description>&lt;P&gt;1) good idea&lt;/P&gt;

&lt;P&gt;2) do you have any idea how can i bring this &lt;CODE&gt;host."-".instance&lt;/CODE&gt; information as a label on chart? i try to represent it with bar grafik.&lt;/P&gt;

&lt;P&gt;3) i try to colorise chart bars.its look like so. if you set the information in a variable named range.&lt;BR /&gt;
how can i use it for colouration&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;   &amp;lt;option name="charting.legend.masterLegend"&amp;gt;&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.axisTitleY.text"&amp;gt;Usage by Percent&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.chart"&amp;gt;column&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.legend.labels"&amp;gt;[redCritical,yellowWarning,greenOK]&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.legend.placement"&amp;gt;bottom&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.seriesColors"&amp;gt;[0xFF0000,0xFFFF00,0x00FF00]&amp;lt;/option&amp;gt;
      &amp;lt;/chart&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 10 Aug 2017 12:27:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Perfmon-Free-Disk-Space-instance-C-chart/m-p/360420#M5860</guid>
      <dc:creator>karakutu</dc:creator>
      <dc:date>2017-08-10T12:27:38Z</dc:date>
    </item>
    <item>
      <title>Re: Perfmon:Free Disk Space  instance=C:  chart</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Perfmon-Free-Disk-Space-instance-C-chart/m-p/360421#M5861</link>
      <description>&lt;P&gt;i try also with &lt;CODE&gt;table key&lt;/CODE&gt; but everytime i get the value of  &lt;CODE&gt;redCritical  yellowWarning   greenOK&lt;/CODE&gt;as 0&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=main sourcetype="Perfmon:Free Disk Space" ( instance="C:"  OR  instance="D:")
  | eval key= host."-".instance
  | chart latest(Value) as Valuex by key
  | eval PercentUsed = 100 - Valuex
  | eval redCritical   = if(PercentFree  &amp;gt;= 86,PercentFree  ,0) 
  | eval yellowWarning = if(PercentFree  &amp;gt; 76 AND PercentFree &amp;lt;=85,PercentFree  ,0) 
  | eval  greenOK= if(PercentFree  &amp;lt; 75,PercentFree  ,0) 
  | table key,redCritical,yellowWarning,greenOK



key redCritical yellowWarning   greenOK
PostNL-WTS-C:   0   0   0
PostNL-WTS-D:   0   0   0
WIN-G1OI73OMETI-C:  0   0   0
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 10 Aug 2017 14:32:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Perfmon-Free-Disk-Space-instance-C-chart/m-p/360421#M5861</guid>
      <dc:creator>karakutu</dc:creator>
      <dc:date>2017-08-10T14:32:57Z</dc:date>
    </item>
    <item>
      <title>Re: Perfmon:Free Disk Space  instance=C:  chart</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Perfmon-Free-Disk-Space-instance-C-chart/m-p/360422#M5862</link>
      <description>&lt;P&gt;Sorry I had missed correction from PercentFree to PercentUsed. I have updated my answer again. Please test and accept if it solves the need.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Aug 2017 01:44:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Perfmon-Free-Disk-Space-instance-C-chart/m-p/360422#M5862</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-08-11T01:44:41Z</dc:date>
    </item>
    <item>
      <title>Re: Perfmon:Free Disk Space  instance=C:  chart</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Perfmon-Free-Disk-Space-instance-C-chart/m-p/360423#M5863</link>
      <description>&lt;P&gt;its work thanks. Tesekkürler &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Aug 2017 06:41:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Perfmon-Free-Disk-Space-instance-C-chart/m-p/360423#M5863</guid>
      <dc:creator>karakutu</dc:creator>
      <dc:date>2017-08-11T06:41:01Z</dc:date>
    </item>
    <item>
      <title>Re: Perfmon:Free Disk Space  instance=C:  chart</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Perfmon-Free-Disk-Space-instance-C-chart/m-p/360424#M5864</link>
      <description>&lt;P&gt;@karakutu, Kindly accept my answer for the same.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Aug 2017 11:49:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Perfmon-Free-Disk-Space-instance-C-chart/m-p/360424#M5864</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-08-11T11:49:44Z</dc:date>
    </item>
  </channel>
</rss>

