fluent-plugin-elasticsearch-ruby 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -1
- data/lib/fluent/plugin/out_elasticsearch.rb +0 -5
- data/lib/fluent-plugin-elasticsearch/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8f4dd2418653692d7202a2530fcdb808f57e89fe
|
4
|
+
data.tar.gz: 56592b75eac47516cc06da7146a88e6d2974d0b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 846aacab3dff47287feafc649ec6aba30ca3fe5cb85e316a8e237f1240b16455f4be9cd9c5d2a91e12ab2e830ab8214433ad78f41db8168748591c6f246c9c4e
|
7
|
+
data.tar.gz: 72df10e51d5e37a7885990b5fadc2c94cad6573901a381aa4204bcd38abea105be66e095de0dc0cba207144b4e24a0ed1cd956a4561c3a6c207f9a2a37826390
|
data/README.md
CHANGED
@@ -1,11 +1,14 @@
|
|
1
1
|
# Fluent::Plugin::Elasticsearch
|
2
2
|
|
3
|
-
|
3
|
+
You can search logs routed through Fluentd (Logstash alternative.)
|
4
4
|
|
5
5
|
WIP - converting from tire to the official elasticsearch ruby client.
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
9
|
+
Hosted here -
|
10
|
+
https://rubygems.org/gems/fluent-plugin-elasticsearch-ruby
|
11
|
+
|
9
12
|
Add this line to your application's Gemfile:
|
10
13
|
|
11
14
|
gem 'fluent-plugin-elasticsearch-ruby'
|
@@ -21,7 +21,6 @@ class Fluent::ElasticsearchOutput < Fluent::BufferedOutput
|
|
21
21
|
def start
|
22
22
|
super
|
23
23
|
es_url = "#{self.host}:#{self.port}"
|
24
|
-
puts "es_url: #{es_url}"
|
25
24
|
@es = Elasticsearch::Client.new hosts: [es_url]
|
26
25
|
end
|
27
26
|
|
@@ -34,11 +33,9 @@ class Fluent::ElasticsearchOutput < Fluent::BufferedOutput
|
|
34
33
|
end
|
35
34
|
|
36
35
|
def write(chunk)
|
37
|
-
puts "chunk - #{chunk.inspect}"
|
38
36
|
bulk_items = []
|
39
37
|
|
40
38
|
chunk.msgpack_each do |tag, time, record|
|
41
|
-
puts "#{tag} #{time} #{record}"
|
42
39
|
bulk_items << {
|
43
40
|
:index => {
|
44
41
|
:_index => self.index,
|
@@ -51,9 +48,7 @@ class Fluent::ElasticsearchOutput < Fluent::BufferedOutput
|
|
51
48
|
}
|
52
49
|
}
|
53
50
|
end
|
54
|
-
|
55
51
|
## now bulk index
|
56
|
-
puts "bulk_items - #{bulk_items.inspect}"
|
57
52
|
@es.bulk :index => self.index, :body => bulk_items
|
58
53
|
end
|
59
54
|
##--
|