Hi all,
I've made a couple of colomn charts to monitor healthy machines. But I would like to give the bars certain colors based on a % of unhealthy machines. I tried to google this but I didn't find something that would work for me.
The searches are as followed:
index=linux host=*test* earliest=-1d@d latest=@d "healthcheck: System not healthy" | dedup host | stats count by host
| stats count as TotalA
| appendcols
[search index=linux host=*test* earliest=@d latest=now "healthcheck: System not healthy" | dedup host | stats count by host
| stats count as TotalB]
| appendcols
[search index=linux host=*test* earliest=-2d@d latest=-1d@d "healthcheck: System not healthy" | dedup host | stats count by host
| stats count as TotalC]
| eval Yesterday=TotalA
| eval Today=TotalB
| eval Daybeforethat=TotalC
| fields HealthchecksError, Daybeforethat, Yesterday, Today
This search gives the following chart:
![alt text][1]
These colors are added with the following option:
[1]: /storage/temp/275870-colomnchart.png
If I want to base the colors on a percentage of the values given by the search, should I add this as an option? Or is this supposed to be written in the search? If someone could help me out with, for example, turn color red if percentage is >10?
I've used the static color changes before in the source code but with a growing company, this isn't efficient.
Thanks a lot!
↧