Class: ATSD::AlertsService
- Inherits:
- 
      BaseService
      
        - Object
- BaseService
- ATSD::AlertsService
 
- Defined in:
- lib/atsd/services/alerts_service.rb
Instance Method Summary collapse
- 
  
    
      #acknowledge(alerts)  ⇒ self 
    
    
  
  
  
  
  
  
  
  
  
    Acknowledge alerts. 
- 
  
    
      #de_acknowledge(alerts)  ⇒ self 
    
    
  
  
  
  
  
  
  
  
  
    De-acknowledge alerts. 
- 
  
    
      #delete(alerts)  ⇒ self 
    
    
  
  
  
  
  
  
  
  
  
    Delete alerts. 
- 
  
    
      #history_query(options = {})  ⇒ AlertsHistoryQuery 
    
    
  
  
  
  
  
  
  
  
  
    Create query builder for alert history. 
- 
  
    
      #query(options = {})  ⇒ AlertsQuery 
    
    
  
  
  
  
  
  
  
  
  
    Create query builder for alerts. 
Methods inherited from BaseService
Constructor Details
This class inherits a constructor from ATSD::BaseService
Instance Method Details
#acknowledge(alerts) ⇒ self
Acknowledge alerts
| 24 25 26 | # File 'lib/atsd/services/alerts_service.rb', line 24 def acknowledge(alerts) alerts_acknowledge alerts, true end | 
#de_acknowledge(alerts) ⇒ self
De-acknowledge alerts
| 33 34 35 | # File 'lib/atsd/services/alerts_service.rb', line 33 def de_acknowledge(alerts) alerts_acknowledge alerts, false end | 
#delete(alerts) ⇒ self
Delete alerts
| 42 43 44 45 46 47 48 49 | # File 'lib/atsd/services/alerts_service.rb', line 42 def delete(alerts) alerts = Utils.ensure_array(alerts).map do |alert| { :id => id_for_alert(alert) } end return if alerts.count == 0 @client.alerts_update :action => 'delete', :alerts => alerts end | 
#history_query(options = {}) ⇒ AlertsHistoryQuery
Create query builder for alert history.
| 55 56 57 58 59 | # File 'lib/atsd/services/alerts_service.rb', line 55 def history_query( = {}) query = AlertsHistoryQuery.new @client .each { |option, value| query[option] = value } query end | 
#query(options = {}) ⇒ AlertsQuery
Create query builder for alerts.
| 13 14 15 16 17 | # File 'lib/atsd/services/alerts_service.rb', line 13 def query( = {}) query = AlertsQuery.new @client .each { |option, value| query[option] = value } query end |