Class: LogStash::Modules::KibanaImporter

Inherits:
Object
  • Object
show all
Includes:
Util::Loggable
Defined in:
lib/logstash/modules/kibana_importer.rb

Instance Method Summary collapse

Methods included from Util::Loggable

included, #logger, #slow_logger

Constructor Details

#initialize(client) ⇒ KibanaImporter

Returns a new instance of KibanaImporter.



8
9
10
# File 'lib/logstash/modules/kibana_importer.rb', line 8

def initialize(client)
  @client = client
end

Instance Method Details

#put(via_kibana) ⇒ Object



12
13
14
15
16
# File 'lib/logstash/modules/kibana_importer.rb', line 12

def put(via_kibana)
  path = via_kibana.import_path
  logger.debug("Attempting POST", :url_path => path, :content => via_kibana.content)
  via_kibana.import(@client)
end