Class: LogStash::Outputs::ElasticsearchHTTP
- Inherits:
-
Base
- Object
- Base
- LogStash::Outputs::ElasticsearchHTTP
- Extended by:
- Forwardable
- Defined in:
- lib/logstash/outputs/elasticsearch_http.rb
Overview
This plugin is deprecated in favor of using elasticsearch output and the http protocol Please update your current configuration!
.Example
- source,ruby
-
elasticsearch
protocol => 'http' host => '127.0.0.1'
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ ElasticsearchHTTP
constructor
A new instance of ElasticsearchHTTP.
Constructor Details
#initialize(options = {}) ⇒ ElasticsearchHTTP
Returns a new instance of ElasticsearchHTTP.
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 |
# File 'lib/logstash/outputs/elasticsearch_http.rb', line 99 def initialize( = {}) super() @logger = Cabin::Channel.get(LogStash) = [] << "The elasticsearch_http output is replaced by the elasticsearch output and will be removed in a future version of Logstash" if .delete("replication") == "async" << "Ignoring the async replication option, this option is not recommended and not supported by this plugin" end # transform configuration ["host"] = [['host']] ["protocol"] = "http" # Generate a migration configuration for the new elasticsearch output # using the current settings as the base. << "The following configuration example is based on the options you specified and should work:" << "elasticsearch {" @config.each do |option, value| if display_option?(option, value) << "#{option} => #{format_value(value)}" end end << "}\n" @logger.warn(.join("\n")) @elasticsearch_output = LogStash::Outputs::ElasticSearch.new() end |