Golan Shem-Tov here with the Foglight Solutions Architects team at Quest.
This blog explain how to add thresholds to metrics so we can see alarm colors in spinners, jelly beans and other gauges.
To actually see a color on gauges there is a need to define thresholds for the metric so there is a definition of value range that is normal/warning/critical/fatal. Defining thresholds is done using thresholds from the administration portal.
The first 2 items that are needed for a threshold are topology type and metric. One way to verify the topology type of the object you want to use is looking at the Foglight Data dashboard to verify the object’s topology type.
In this case we want to use the JVM BytesUsedPercent which according to the data tree belongs to an object type JavaEEJVM
For step 1 in creating a threshold we put the topology type and metric.
For step 2 we decide what kind of thresholds we want to use, typically AlarmSeverity or ThresholdSeverity will be used but it is recommended that you check the guide for the different types and levels that exist.
In the next steps you have to add bound types and their value, in this case we chose constant values but you can also choose registry variables or other types.
Note that it is very important that the value you have for the metric falls between bound types, if a metric value does not fall between 2 bound types you will get the blue color or a value without a level.
In this case for example we chose these values which theoretically look just fine.
The problem is that the end result will be that a value over 85 does not belong to any bound, there is a lower bound of 85 but no higher bound so 90% will be blue.
You can confirm this by showing the thresholds on a graph, the area above 85 has no level/color
To correct that we can add another level for fatal, and now we are telling foglight that values between 85 and 100 are fatal.
This will be the end result:
Dragging this metric and choosing the different gauges we will see this:
I hope you find this article useful, feel free to contact me with comments or questions to email@example.com