fluent-plugin-logentries 0.2.2 → 0.2.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 +6 -3
- data/fluent-plugin-logentries.gemspec +1 -1
- data/lib/fluent/plugin/out_logentries.rb +15 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c1fc17a79f9e065c5a8a9f6864b9297c1baf7765
|
4
|
+
data.tar.gz: bef9079fbd310d72a44d277bfe0084c9021e0504
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b8c205c48bc660ed68551c2b93becea9ef3e3768b01d64aae23708ef5145970ae250e610c704e2a41e718399319c88afb105101518f411c5d981624e2ebf5b07
|
7
|
+
data.tar.gz: f3039171065808e2d41bbcb2bc7c691161dc16bb1da32f6203e25eb9f6a6e13ba9ecac485a2671502a043db79e8677144430c50d926235f5c61252d38f839df0
|
data/README.md
CHANGED
@@ -25,7 +25,7 @@ install with gem or fluent-gem command as:
|
|
25
25
|
access: 5deab21c-04b1-9122-abdc-09adb2eda22 (*)
|
26
26
|
error: 9acfbeba-c92c-1229-ccac-12c58d82ecc (*)
|
27
27
|
```
|
28
|
-
(*) `access` and `error
|
28
|
+
(*) `access` and `error are optional, if you don't use multiple log per host just provide an app token.
|
29
29
|
|
30
30
|
This file is read everytime the buffer is flushed, it allows on fly modifications.
|
31
31
|
## Usage
|
@@ -45,11 +45,14 @@ The value must be `logentries`.
|
|
45
45
|
### config_path (required)
|
46
46
|
Path of your configuration file, e.g. `/opt/logentries/tokens.conf`
|
47
47
|
|
48
|
+
### protocol
|
49
|
+
The default is `tcp`.
|
50
|
+
|
48
51
|
### use_ssl
|
49
52
|
Enable/disable SSL for data transfers between Fluentd and Logentries. The default is `true`.
|
50
53
|
|
51
|
-
###
|
52
|
-
Only in case you don't use SSL, the value must be `80`, `514`, or `10000`. The default is `
|
54
|
+
### port
|
55
|
+
Only in case you don't use SSL, the value must be `80`, `514`, or `10000`. The default is `20000` (SSL)
|
53
56
|
|
54
57
|
### max_retries
|
55
58
|
Number of retries on failure.
|
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "fluent-plugin-logentries"
|
7
|
-
spec.version = "0.2.
|
7
|
+
spec.version = "0.2.3"
|
8
8
|
spec.authors = ["Woorank"]
|
9
9
|
spec.email = ["dev@woorank.com"]
|
10
10
|
spec.summary = "Logentries output plugin for Fluent event collector"
|
@@ -9,15 +9,18 @@ class LogentriesOutput < Fluent::BufferedOutput
|
|
9
9
|
Fluent::Plugin.register_output('logentries', self)
|
10
10
|
|
11
11
|
config_param :use_ssl, :bool, :default => true
|
12
|
-
config_param :
|
12
|
+
config_param :port, :integer, :default => 20000
|
13
|
+
config_param :protocol, :string, :default => 'tcp'
|
13
14
|
config_param :config_path, :string
|
14
15
|
config_param :max_retries, :integer, :default => 3
|
15
16
|
config_param :tag_access_log, :string, :default => 'logs-access'
|
16
17
|
config_param :tag_error_log, :string, :default => 'logs-error'
|
17
18
|
|
19
|
+
SSL_HOST = "api.logentries.com"
|
20
|
+
NO_SSL_HOST = "data.logentries.com"
|
21
|
+
|
18
22
|
def configure(conf)
|
19
23
|
super
|
20
|
-
|
21
24
|
@tokens = nil
|
22
25
|
@last_edit = Time.at(0)
|
23
26
|
end
|
@@ -30,15 +33,22 @@ class LogentriesOutput < Fluent::BufferedOutput
|
|
30
33
|
super
|
31
34
|
end
|
32
35
|
|
33
|
-
def
|
36
|
+
def ssl_client
|
34
37
|
@_socket ||= if @use_ssl
|
35
38
|
context = OpenSSL::SSL::SSLContext.new
|
36
|
-
socket = TCPSocket.new
|
39
|
+
socket = TCPSocket.new SSL_HOST, @port
|
37
40
|
ssl_client = OpenSSL::SSL::SSLSocket.new socket, context
|
38
41
|
|
39
42
|
ssl_client.connect
|
40
43
|
else
|
41
|
-
|
44
|
+
if @protocol == 'tcp'
|
45
|
+
TCPSocket.new NO_SSL_HOST, @port
|
46
|
+
else
|
47
|
+
udp_client = UDPSocket.new
|
48
|
+
udp_client.connect NO_SSL_HOST, @port
|
49
|
+
|
50
|
+
udp_client
|
51
|
+
end
|
42
52
|
end
|
43
53
|
end
|
44
54
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-logentries
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Woorank
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-01-
|
11
|
+
date: 2015-01-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|