class Hawkular::Inventory::Metric
Attributes
display_name[R]
@return [String] Display Name of the metric
expression[R]
@return [String] Promql expression for fetching the time series
family[R]
@return [String] Family of the metric (Prometheus
family name)
labels[R]
@return [Hash<String,String>] Labels of this metric (Prometheus
labels)
name[R]
@return [String] Provider Name of the metric
properties[R]
@return [Hash<String,String>] Properties of this metric
unit[R]
@return [String] Unit of the metric
Public Class Methods
new(hash)
click to toggle source
# File lib/hawkular/inventory/entities.rb 19 def initialize(hash) 20 @name = hash['displayName'] 21 @display_name = hash['displayName'] 22 @family = hash['family'] 23 @expression = hash['expression'] 24 @unit = hash['unit'] 25 @labels = hash['labels'] || {} 26 @properties = hash['properties'] || {} 27 @_hash = hash.dup 28 end
Public Instance Methods
to_h()
click to toggle source
Returns a hash representation of the metric type @return [Hash<String,Object>] hash of the metric type
# File lib/hawkular/inventory/entities.rb 32 def to_h 33 @_hash.dup 34 end