Class: GraylogAPI::Alerts

Inherits:
Object
  • Object
show all
Defined in:
lib/graylogapi/alerts.rb

Overview

class for manage stream alerts for all streams

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Alerts

Returns a new instance of Alerts.



4
5
6
# File 'lib/graylogapi/alerts.rb', line 4

def initialize(client)
  @client = client
end

Instance Method Details

#by_id(id, options = {}) ⇒ Object



16
17
18
# File 'lib/graylogapi/alerts.rb', line 16

def by_id(id, options = {})
  @client.json_request(:get, "/streams/alerts/#{id}", options)
end

#paginated(options = {}) ⇒ Object



12
13
14
# File 'lib/graylogapi/alerts.rb', line 12

def paginated(options = {})
  @client.json_reuqest(:get, '/streams/alerts/paginated', options)
end

#recent(options = {}) ⇒ Object



8
9
10
# File 'lib/graylogapi/alerts.rb', line 8

def recent(options = {})
  @client.json_request(:get, '/streams/alerts', options)
end