fluent-plugin-logmatic 0.8.1 → 0.8.2
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 -3
- data/fluent-plugin-logmatic.gemspec +1 -1
- data/lib/fluent/plugin/out_logmatic.rb +7 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 397c268da8e4803ae534093870663686d66304fc
|
4
|
+
data.tar.gz: b654b661334d8313f73d46d13bcfaa037422b870
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 83b909ecb321d9234231c4677b829813db4ddb71cbaf3684ae974415f4bd1aabe10fb120b3621ce84363fba0960e79b2415961735c512aeb0cab85d1a9a1bcdb
|
7
|
+
data.tar.gz: 22a7cf716fe4334e4c5eb1d4f4fdba6bf4dc1fc310d6f22f8d8d8fe821da48aa77574d13946b09b5ea86428f6c45f03b00411892616c96295303ab35221afd2b
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
#
|
1
|
+
# Fluentd output plugin for Logmatic.io.
|
2
|
+
Link to the [Logmatic.io documentation](http://doc.logmatic.io/docs/using-fluentd)*
|
2
3
|
|
3
|
-
Fluentd output plugin for Logmatic.io.
|
4
4
|
|
5
5
|
It mainly contains a proper JSON formatter and a socket handler that
|
6
6
|
streams logs directly to Logmatic.io - so no need to use a log shipper
|
@@ -61,5 +61,6 @@ As fluent-plugin-logmatic is an output_buffer, you can set all output_buffer pro
|
|
61
61
|
|-------------|--------------------------------------------------------------------------|----------------|
|
62
62
|
| **api_key** | This parameter is required in order to authenticate your fluent agent. | nil |
|
63
63
|
| **use_json**| Event format, if true, the event is sent in json format. Othwerwise, in plain text. | true |
|
64
|
+
| **include_tag_key**| Automatically include tags in the record. | false |
|
64
65
|
| **use_ssl** | If true, the agent initializes a secure connection to Logmatic.io. In clear TCP otherwise. | true |
|
65
|
-
|**max_retries**| The number of retries before the output plugin stops. Set to -1 for unlimited retries | -1 |
|
66
|
+
|**max_retries**| The number of retries before the output plugin stops. Set to -1 for unlimited retries | -1 |
|
@@ -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-logmatic"
|
7
|
-
spec.version = "0.8.
|
7
|
+
spec.version = "0.8.2"
|
8
8
|
spec.authors = ["Logmatic support team"]
|
9
9
|
spec.email = ["support@logmatic.io"]
|
10
10
|
spec.summary = "Logmatic output plugin for Fluent event collector"
|
@@ -8,6 +8,7 @@ class Fluent::LogmaticOutput < Fluent::BufferedOutput
|
|
8
8
|
Fluent::Plugin.register_output('logmatic', self)
|
9
9
|
# Output settings
|
10
10
|
config_param :use_json, :bool, :default => true
|
11
|
+
config_param :include_tag_key,:bool, :default => false
|
11
12
|
|
12
13
|
# Connection settings
|
13
14
|
config_param :host, :string, :default => 'api.logmatic.io'
|
@@ -15,10 +16,11 @@ class Fluent::LogmaticOutput < Fluent::BufferedOutput
|
|
15
16
|
config_param :port, :integer, :default => 10514
|
16
17
|
config_param :ssl_port, :integer, :default => 10515
|
17
18
|
config_param :max_retries, :integer, :default => -1
|
18
|
-
|
19
|
+
|
20
|
+
|
19
21
|
# API Settings
|
20
22
|
config_param :api_key, :string
|
21
|
-
|
23
|
+
|
22
24
|
def initialize
|
23
25
|
super
|
24
26
|
end
|
@@ -73,6 +75,9 @@ class Fluent::LogmaticOutput < Fluent::BufferedOutput
|
|
73
75
|
chunk.msgpack_each do |tag, record|
|
74
76
|
next unless record.is_a? Hash
|
75
77
|
next unless @use_json or record.has_key? "message"
|
78
|
+
if @include_tag_key
|
79
|
+
record[@tag_key] = tag
|
80
|
+
end
|
76
81
|
if @use_json
|
77
82
|
messages.push "#{api_key} " + record.to_json + "\n"
|
78
83
|
else
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-logmatic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Logmatic support team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-12-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -72,7 +72,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
72
72
|
version: '0'
|
73
73
|
requirements: []
|
74
74
|
rubyforge_project:
|
75
|
-
rubygems_version: 2.
|
75
|
+
rubygems_version: 2.5.1
|
76
76
|
signing_key:
|
77
77
|
specification_version: 4
|
78
78
|
summary: Logmatic output plugin for Fluent event collector
|