Class: CachetMetrics
- Inherits:
-
CachetClient
- Object
- CachetClient
- CachetMetrics
- Defined in:
- lib/cachet.rb
Overview
Inherits CachetClient and handles all Metrics API Calls
Constant Summary
Constants inherited from CachetClient
CachetClient::INCIDENT_FIXED, CachetClient::INCIDENT_IDENTIFIED, CachetClient::INCIDENT_INVESTIGATING, CachetClient::INCIDENT_SCHEDULED, CachetClient::INCIDENT_WATCHING, CachetClient::STATUS_MAJOR_OUTAGE, CachetClient::STATUS_OPERATIONAL, CachetClient::STATUS_PARTIAL_OUTAGE, CachetClient::STATUS_PERFORMANCE_ISSUES, CachetClient::VERSION
Instance Method Summary collapse
-
#create(options) ⇒ Object
Create Metric.
-
#delete(options) ⇒ Object
Delete a Metric.
-
#list ⇒ Object
List all Metrics.
-
#list_id(options) ⇒ Object
List Metric by ID Without Points.
-
#point_add(options) ⇒ Object
Add Metric Point.
-
#point_delete(options) ⇒ Object
Delete Metric Point.
-
#point_list(options) ⇒ Object
List Metric Points.
Methods inherited from CachetClient
Constructor Details
This class inherits a constructor from CachetClient
Instance Method Details
#create(options) ⇒ Object
Create Metric.
324 325 326 327 328 |
# File 'lib/cachet.rb', line 324 def create() request method: :post, url: @base_url + 'metrics', payload: end |
#delete(options) ⇒ Object
Delete a Metric.
347 348 349 350 |
# File 'lib/cachet.rb', line 347 def delete() request method: :delete, url: @base_url + 'metrics/' + ['id'].to_s end |
#list ⇒ Object
List all Metrics.
309 310 311 312 |
# File 'lib/cachet.rb', line 309 def list request method: :get, url: @base_url + 'metrics' end |
#list_id(options) ⇒ Object
List Metric by ID Without Points.
336 337 338 339 |
# File 'lib/cachet.rb', line 336 def list_id() request method: :get, url: @base_url + 'metrics/' + ['id'].to_s end |
#point_add(options) ⇒ Object
Add Metric Point.
371 372 373 374 375 |
# File 'lib/cachet.rb', line 371 def point_add() request method: :post, url: @base_url + 'metrics/' + ['id'].to_s + '/points', payload: end |
#point_delete(options) ⇒ Object
Delete Metric Point.
384 385 386 387 388 |
# File 'lib/cachet.rb', line 384 def point_delete() request method: :delete, url: @base_url + 'metrics/' + ['id'].to_s + '/points/' + ['point_id'].to_s, payload: end |
#point_list(options) ⇒ Object
List Metric Points.
358 359 360 361 |
# File 'lib/cachet.rb', line 358 def point_list() request method: :get, url: @base_url + 'metrics/' + ['id'].to_s + '/points' end |