hi
With the xml below, i display a complex bar chart that you can see in the screenshot
I would like to modify 3 things :
1 - I need to delete "Number" under the X axis
2 - Under each bar...
See more...
hi
With the xml below, i display a complex bar chart that you can see in the screenshot
I would like to modify 3 things :
1 - I need to delete "Number" under the X axis
2 - Under each bar of the chart I would like to have the scale that is actually in the legend
Could you help me please?
3- I need to do an average on process_cpu_used_percent field
Something like :
| eval cpu_range=case(avg(process_cpu_used_percent>0 AND process_cpu_used_percent <=20,"0-20",
<row>
<panel>
<title>CPU overall usage</title>
<chart>
<search>
<query> `CPU`
| fields process_cpu_used_percent host
| eval host=upper(host)
| eval cpu_range=case(process_cpu_used_percent>0 AND process_cpu_used_percent <=20,"0-20",
process_cpu_used_percent>20 AND process_cpu_used_percent <=40,"20-40",
process_cpu_used_percent>40 AND process_cpu_used_percent <=60,"40-60",
process_cpu_used_percent>60 AND process_cpu_used_percent <=80,"60-80",
process_cpu_used_percent>80 AND process_cpu_used_percent <=100,"80-100")
| chart dc(host) as "Number" by cpu_range
| append
[| makeresults
| fields - _time
| eval cpu_range="0-20,20-40,40-60,60-80,80-100"
| makemv cpu_range delim=","
| mvexpand cpu_range
| eval "Number"=0]
| dedup cpu_range
| sort cpu_range
| transpose header_field=cpu_range
| search column!="_*"
| rename column as cpu_range</query>
<earliest>-7d@h</earliest>
<latest>now</latest>
</search>
<option name="charting.axisTitleX.text">CPU Usage (%)</option>
<option name="charting.axisTitleY.text">Number of hosts</option>
<option name="charting.axisY.abbreviation">none</option>
<option name="charting.axisY.maximumNumber">1000</option>
<option name="charting.axisY.minimumNumber">0</option>
<option name="charting.axisY.scale">linear</option>
<option name="charting.chart">column</option>
<option name="charting.chart.showDataLabels">all</option>
<option name="charting.chart.stackMode">default</option>
<option name="charting.drilldown">none</option>
<option name="charting.fieldColors">{"0-20":0x49B849,"20-40":0x006EAA,"40-60":0xE0AC16,"60-80":0xDA742E,"80-100":0xC84535}</option>
<option name="charting.legend.placement">right</option>
<option name="refresh.display">progressbar</option>
</chart>
</panel>
</row>
<row>