Class: Hawkular::Metrics::Client::Gauges
- Defined in:
- lib/hawkular/metrics/metric_api.rb
Overview
Class that interacts with “gauge” metric types
Instance Method Summary collapse
-
#get_periods(id, starts: nil, ends: nil, threshold: nil, operation: nil) ⇒ Object
Retrieve time ranges when given gauge matches given operation and threshold.
-
#initialize(client) ⇒ Gauges
constructor
A new instance of Gauges.
Methods inherited from Metrics
#create, #encode_params, #get, #get_data, #get_data_by_tags, #push_data, #query, #raw_data, #update_tags
Constructor Details
#initialize(client) ⇒ Gauges
Returns a new instance of Gauges
248 249 250 |
# File 'lib/hawkular/metrics/metric_api.rb', line 248 def initialize(client) super(client, 'gauge', 'gauges') end |
Instance Method Details
#get_periods(id, starts: nil, ends: nil, threshold: nil, operation: nil) ⇒ Object
Retrieve time ranges when given gauge matches given operation and threshold
262 263 264 265 |
# File 'lib/hawkular/metrics/metric_api.rb', line 262 def get_periods(id, starts: nil, ends: nil, threshold: nil, operation: nil) params = { start: starts, end: ends, threshold: threshold, op: operation } @client.http_get("/#{@resource}/#{ERB::Util.url_encode(id)}/periods?" + encode_params(params)) end |