Class: Wavefront::Alerting
- Inherits:
-
Object
- Object
- Wavefront::Alerting
- Includes:
- Constants, Mixins, Validators
- Defined in:
- lib/wavefront/alerting.rb
Constant Summary collapse
- DEFAULT_PATH =
'/api/alert/'
Constants included from Constants
Constants::ALERT_FORMATS, Constants::DEFAULT_ALERT_FORMAT, Constants::DEFAULT_FORMAT, Constants::DEFAULT_HOST, Constants::DEFAULT_INFILE_FORMAT, Constants::DEFAULT_OBSOLETE_METRICS, Constants::DEFAULT_PERIOD_SECONDS, Constants::DEFAULT_PREFIX_LENGTH, Constants::DEFAULT_PROXY, Constants::DEFAULT_PROXY_PORT, Constants::DEFAULT_STRICT, Constants::EVENT_LEVELS, Constants::EVENT_STATE_DIR, Constants::FORMATS, Constants::GRANULARITIES
Instance Attribute Summary collapse
-
#token ⇒ Object
readonly
Returns the value of attribute token.
Instance Method Summary collapse
- #active(options = {}) ⇒ Object
- #affected_by_maintenance(options = {}) ⇒ Object
- #all(options = {}) ⇒ Object
-
#initialize(token, debug = false) ⇒ Alerting
constructor
A new instance of Alerting.
- #invalid(options = {}) ⇒ Object
- #snoozed(options = {}) ⇒ Object
Methods included from Mixins
#hash_to_qs, #interpolate_schema, #parse_time, #time_to_ms, #uri_concat
Methods included from Validators
#valid_path?, #valid_source?, #valid_string?, #valid_tags?, #valid_ts?, #valid_value?
Constructor Details
#initialize(token, debug = false) ⇒ Alerting
Returns a new instance of Alerting.
33 34 35 36 |
# File 'lib/wavefront/alerting.rb', line 33 def initialize(token, debug=false) @token = token debug(debug) end |
Instance Attribute Details
#token ⇒ Object (readonly)
Returns the value of attribute token.
31 32 33 |
# File 'lib/wavefront/alerting.rb', line 31 def token @token end |
Instance Method Details
#active(options = {}) ⇒ Object
38 39 40 |
# File 'lib/wavefront/alerting.rb', line 38 def active(={}) get_alerts('active', ) end |
#affected_by_maintenance(options = {}) ⇒ Object
54 55 56 |
# File 'lib/wavefront/alerting.rb', line 54 def affected_by_maintenance(={}) get_alerts('affected_by_maintenance', ) end |
#all(options = {}) ⇒ Object
42 43 44 |
# File 'lib/wavefront/alerting.rb', line 42 def all(={}) get_alerts('all', ) end |
#invalid(options = {}) ⇒ Object
46 47 48 |
# File 'lib/wavefront/alerting.rb', line 46 def invalid(={}) get_alerts('invalid', ) end |
#snoozed(options = {}) ⇒ Object
50 51 52 |
# File 'lib/wavefront/alerting.rb', line 50 def snoozed(={}) get_alerts('snoozed', ) end |