<?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: Color the graph depending of count in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/Color-the-graph-depending-of-count/m-p/309819#M4131</link>
    <description>&lt;P&gt;Hey which version of Splunk you are using?&lt;BR /&gt;
There is a formatting option available in newer version of splunk&lt;BR /&gt;
Click on the &lt;CODE&gt;Paint symbol&amp;gt;&amp;gt;Color&amp;gt;&amp;gt;Select Ranges&lt;/CODE&gt; and then specify ranges and give appropriate color.&lt;/P&gt;

&lt;P&gt;let me know if this helps!&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/4439iE2CE8051BDEA5D80/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>Fri, 23 Feb 2018 07:20:44 GMT</pubDate>
    <dc:creator>mayurr98</dc:creator>
    <dc:date>2018-02-23T07:20:44Z</dc:date>
    <item>
      <title>Color the graph depending of count</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Color-the-graph-depending-of-count/m-p/309818#M4130</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I have different server running the same process. I like to count the "ERROR" in the logfile and the color of the graph should change depending on the number of errors. Like 0 to 2 error = green, 3 to 10 error yellow and above 11 error red. How can I realize this in a report. &lt;BR /&gt;
My search is &lt;/P&gt;

&lt;P&gt;index="Index_name" SEARCHSTRING |stats count by host&lt;/P&gt;

&lt;P&gt;What I have to add, the the color of an host changes if the number of SEARCHSTRING is like written above.&lt;/P&gt;

&lt;P&gt;Thx for your help. &lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2018 06:23:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Color-the-graph-depending-of-count/m-p/309818#M4130</guid>
      <dc:creator>obrosch</dc:creator>
      <dc:date>2018-02-23T06:23:14Z</dc:date>
    </item>
    <item>
      <title>Re: Color the graph depending of count</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Color-the-graph-depending-of-count/m-p/309819#M4131</link>
      <description>&lt;P&gt;Hey which version of Splunk you are using?&lt;BR /&gt;
There is a formatting option available in newer version of splunk&lt;BR /&gt;
Click on the &lt;CODE&gt;Paint symbol&amp;gt;&amp;gt;Color&amp;gt;&amp;gt;Select Ranges&lt;/CODE&gt; and then specify ranges and give appropriate color.&lt;/P&gt;

&lt;P&gt;let me know if this helps!&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/4439iE2CE8051BDEA5D80/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>Fri, 23 Feb 2018 07:20:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Color-the-graph-depending-of-count/m-p/309819#M4131</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-02-23T07:20:44Z</dc:date>
    </item>
    <item>
      <title>Re: Color the graph depending of count</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Color-the-graph-depending-of-count/m-p/309820#M4132</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;this only works on tables. I need it for a graph. I want, that the graph changes its color depending on the count. Just like in the table.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2018 07:46:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Color-the-graph-depending-of-count/m-p/309820#M4132</guid>
      <dc:creator>obrosch</dc:creator>
      <dc:date>2018-02-23T07:46:43Z</dc:date>
    </item>
    <item>
      <title>Re: Color the graph depending of count</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Color-the-graph-depending-of-count/m-p/309821#M4133</link>
      <description>&lt;P&gt;Sorry, I forgot my Version. It is 7.0.2&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2018 08:21:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Color-the-graph-depending-of-count/m-p/309821#M4133</guid>
      <dc:creator>obrosch</dc:creator>
      <dc:date>2018-02-23T08:21:10Z</dc:date>
    </item>
    <item>
      <title>Re: Color the graph depending of count</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Color-the-graph-depending-of-count/m-p/309822#M4134</link>
      <description>&lt;P&gt;which graph you are using ?&lt;BR /&gt;
have you look at this two answers?&lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/145120/bar-chart-column-color-based-on-value.html"&gt;https://answers.splunk.com/answers/145120/bar-chart-column-color-based-on-value.html&lt;/A&gt;&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/58335/change-chart-bar-color-based-on-data-value.html"&gt;https://answers.splunk.com/answers/58335/change-chart-bar-color-based-on-data-value.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2018 08:25:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Color-the-graph-depending-of-count/m-p/309822#M4134</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-02-23T08:25:08Z</dc:date>
    </item>
    <item>
      <title>Re: Color the graph depending of count</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Color-the-graph-depending-of-count/m-p/309823#M4135</link>
      <description>&lt;P&gt;Here is how&lt;/P&gt;

&lt;P&gt;Create a new variable for each color of bar that you want: redCount, yellowCount, greenCount - for example&lt;/P&gt;

&lt;P&gt;Assign the count value to the appropriate variable&lt;/P&gt;

&lt;P&gt;Create a stacked column chart (or a stacked bar chart if you want it horizontally)&lt;/P&gt;

&lt;P&gt;Put the chart in a dashboard, so that you can set the color attributes for the bars&lt;/P&gt;

&lt;P&gt;Here is a simple XML example of the code snippet for a chart that should work:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; &amp;lt;chart&amp;gt;
       &amp;lt;searchString&amp;gt;index="Index_name" SEARCHSTRING |stats count by host 
         | eval redCount = if(count&amp;gt;=11,count,0)
         | eval yellowCount = if(count&amp;lt;=3 AND count&amp;gt;=10,count,0)
         | eval greenCount = if(count&amp;lt;=2, count, 0)
         | fields - count&amp;lt;/searchString&amp;gt;
       &amp;lt;title&amp;gt;Server Errors by Host - Last  24 hours&amp;lt;/title&amp;gt;
       &amp;lt;earliestTime&amp;gt;-24h@h&amp;lt;/earliestTime&amp;gt;
       &amp;lt;latestTime&amp;gt;@h&amp;lt;/latestTime&amp;gt;
       &amp;lt;option name="charting.chart"&amp;gt;column&amp;lt;/option&amp;gt;
       &amp;lt;option name="charting.chart.stackMode"&amp;gt;stacked&amp;lt;/option&amp;gt;
       &amp;lt;option name="charting.fieldColors"&amp;gt;{"redCount":0xFF0000,"yellowCount":0xFFFF00, "greenCount":0x73A550}&amp;lt;/option&amp;gt;
       &amp;lt;option name="charting.legend.placement"&amp;gt;none&amp;lt;/option&amp;gt;
       &amp;lt;option name="charting.legend.placement"&amp;gt;none&amp;lt;/option&amp;gt;     
       &amp;lt;option name="charting.axisLabelsX.majorLabelStyle.rotation"&amp;gt;90&amp;lt;/option&amp;gt;  
     &amp;lt;/chart&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Note that the last option sets the X-axis labels to print vertically on the column chart. If you prefer, you could set the charting.chart option to "bar" and then eliminate the option for charting.axisLabelsX.majorLabelStyle.rotation&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2018 08:44:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Color-the-graph-depending-of-count/m-p/309823#M4135</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-02-23T08:44:07Z</dc:date>
    </item>
    <item>
      <title>Re: Color the graph depending of count</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Color-the-graph-depending-of-count/m-p/309824#M4136</link>
      <description>&lt;P&gt;Hello  mayurr98,&lt;/P&gt;

&lt;P&gt;that helped. Thank you very much. I have to change the "&amp;lt;" and "&amp;gt;" to "&amp;lt;" and "&amp;gt;" but after that it works. Really great.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2018 06:39:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Color-the-graph-depending-of-count/m-p/309824#M4136</guid>
      <dc:creator>obrosch</dc:creator>
      <dc:date>2018-02-26T06:39:59Z</dc:date>
    </item>
  </channel>
</rss>

