class NewRelicApi::ThresholdValue
A threshold value represents a single health indicator for an application such as CPU, memory or response time.
Fields¶ ↑
name
-
The name of the threshold setting associated with this threshold value.
begin_time
-
Time value indicating start of evaluation period, as a string.
threshold_value
-
A value of 0, 1, 2 or 3 representing gray (not reporting), green, yellow and red
metric_value
-
The metric value associated with this threshold
Public Instance Methods
color_value()
click to toggle source
Returns the color value for this threshold (Gray, Green, Yellow or Red).
# File lib/new_relic_api.rb 154 def color_value 155 case threshold_value 156 when 3 then 'Red' 157 when 2 then 'Yellow' 158 when 1 then 'Green' 159 else 'Gray' 160 end 161 end
metric_value()
click to toggle source
Return the actual value of the threshold as a Float
Calls superclass method
# File lib/new_relic_api.rb 150 def metric_value 151 super.to_f 152 end
threshold_value()
click to toggle source
Return theshold_value as 0, 1, 2, or 3 representing grey (not reporting) green, yellow, and red, respectively.
Calls superclass method
# File lib/new_relic_api.rb 145 def threshold_value 146 super.to_i 147 end