Class: MMS::Resource::Metric
- Inherits:
-
MMS::Resource
- Object
- MMS::Resource
- MMS::Resource::Metric
- Defined in:
- lib/mms/resource/metric.rb
Instance Attribute Summary collapse
- #data_points(options = {}) ⇒ Array<Hash>
-
#granularity ⇒ Object
Returns the value of attribute granularity.
-
#name ⇒ Object
Returns the value of attribute name.
-
#units ⇒ Object
Returns the value of attribute units.
Attributes inherited from MMS::Resource
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from MMS::Resource
#_load, cache_key, find, #from_hash, #invalidate_cache, table_header, #table_row, #table_section, #to_hash
Instance Attribute Details
#data_points(options = {}) ⇒ Array<Hash>
14 15 16 |
# File 'lib/mms/resource/metric.rb', line 14 def data_points @data_points end |
#granularity ⇒ Object
Returns the value of attribute granularity.
5 6 7 |
# File 'lib/mms/resource/metric.rb', line 5 def granularity @granularity end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/mms/resource/metric.rb', line 3 def name @name end |
#units ⇒ Object
Returns the value of attribute units.
4 5 6 |
# File 'lib/mms/resource/metric.rb', line 4 def units @units end |
Class Method Details
._find(client, group_id, host_id, metric_name) ⇒ Hash
33 34 35 |
# File 'lib/mms/resource/metric.rb', line 33 def self._find(client, group_id, host_id, metric_name) client.get('/groups/' + group_id + '/hosts/' + host_id + '/metrics/' + metric_name) end |
Instance Method Details
#host ⇒ Object
8 9 10 |
# File 'lib/mms/resource/metric.rb', line 8 def host MMS::Resource::Host.find(@client, @data['groupId'], @data['hostId']) end |