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.
327 328 329 330 331 |
# File 'lib/cachet.rb', line 327 def create() request method: :post, url: @base_url + 'metrics', payload: end |
#delete(options) ⇒ Object
Delete a Metric.
350 351 352 353 |
# File 'lib/cachet.rb', line 350 def delete() request method: :delete, url: @base_url + 'metrics/' + ['id'].to_s end |
#list ⇒ Object
List all Metrics.
312 313 314 315 |
# File 'lib/cachet.rb', line 312 def list request method: :get, url: @base_url + 'metrics' end |
#list_id(options) ⇒ Object
List Metric by ID Without Points.
339 340 341 342 |
# File 'lib/cachet.rb', line 339 def list_id() request method: :get, url: @base_url + 'metrics/' + ['id'].to_s end |
#point_add(options) ⇒ Object
Add Metric Point.
374 375 376 377 378 |
# File 'lib/cachet.rb', line 374 def point_add() request method: :post, url: @base_url + 'metrics/' + ['id'].to_s + '/points', payload: end |
#point_delete(options) ⇒ Object
Delete Metric Point.
387 388 389 390 391 |
# File 'lib/cachet.rb', line 387 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.
361 362 363 364 |
# File 'lib/cachet.rb', line 361 def point_list() request method: :get, url: @base_url + 'metrics/' + ['id'].to_s + '/points' end |