fluent-plugin-gelf 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/fluent-plugin-gelf.gemspec +1 -1
- data/lib/fluent/plugin/gelf_plugin_util.rb +2 -2
- data/test/fixtures/array.json +31 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 47ab063fb0da7bc19c1e492807c9dba594ee9a21a90b1bcacecc3bdc6a990428
|
4
|
+
data.tar.gz: f27a04ca82bbab1b636634e32e0dd5f13d6c12dbccc4e31e7a0dc9425faa498c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 53343892ffa2202be73c6c4ae74f6c6d43848deceaa9a24cb220fc7996d322a77ff6a8ffa99eacc8b73ceb77c8fe1bae769321316f6099e694c8ada1158960ff
|
7
|
+
data.tar.gz: 44b83b868144b6e495137cbe07a7e505bc495cac35f5d68e74eea2a3bbeeac343712f2cd10ac26e82e4fb19a9788c1139b66d546f247e35e9618929cc8461c63
|
data/fluent-plugin-gelf.gemspec
CHANGED
@@ -5,7 +5,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "fluent-plugin-gelf"
|
8
|
-
spec.version = "0.2.
|
8
|
+
spec.version = "0.2.6"
|
9
9
|
spec.authors = ["Funding Circle"]
|
10
10
|
spec.email = ["engineering+fluent-plugin-gelf@fundingcircle.com"]
|
11
11
|
|
@@ -37,11 +37,11 @@ module Fluent
|
|
37
37
|
def merge_inner_json(record, key)
|
38
38
|
return record unless record[key]
|
39
39
|
json = Oj.load(record[key].strip)
|
40
|
-
return record unless json
|
40
|
+
return record unless json.is_a?(Hash)
|
41
41
|
json["host"] = record["host"] # preserve host
|
42
42
|
record.delete(key)
|
43
43
|
record.merge(json)
|
44
|
-
rescue Oj::ParseError, EncodingError
|
44
|
+
rescue Oj::ParseError, EncodingError
|
45
45
|
record
|
46
46
|
end
|
47
47
|
|
@@ -0,0 +1,31 @@
|
|
1
|
+
{
|
2
|
+
"event": {
|
3
|
+
"tag": "docker.9ee424d12013",
|
4
|
+
"time": "2022-02-03 16:17:23.034547719",
|
5
|
+
"record": {
|
6
|
+
"container_id": "4788c604bce1d6fcd8365465a9d3e68c9f38629fedcc1a4ad1ccfa075ab64298",
|
7
|
+
"container_name": "/mesos-9e0577fe-26b0-43f2-8f4a-7462c51f9c28",
|
8
|
+
"source": "stdout",
|
9
|
+
"log": "[65, 66]",
|
10
|
+
"mesos_framework": "chronos",
|
11
|
+
"app": "analyst-data-scripts-ca-collections-comms-collection-comms-core-python-20220207-111217-021377",
|
12
|
+
"mesos_task_id": "ct:1644232337792:0:analyst-data-scripts-ca-collections-comms-collection-comms-core-python-20220207-111217-021377",
|
13
|
+
"host": "mesosslave-private-0077ac2089c041c6a",
|
14
|
+
"msec": "981"
|
15
|
+
}
|
16
|
+
},
|
17
|
+
"expected": {
|
18
|
+
"timestamp": 1643905043.035,
|
19
|
+
"_fluentd_tag": "docker.9ee424d12013",
|
20
|
+
"_container_id": "4788c604bce1d6fcd8365465a9d3e68c9f38629fedcc1a4ad1ccfa075ab64298",
|
21
|
+
"_container_name": "/mesos-9e0577fe-26b0-43f2-8f4a-7462c51f9c28",
|
22
|
+
"_source": "stdout",
|
23
|
+
"_mesos_framework": "chronos",
|
24
|
+
"_app": "analyst-data-scripts-ca-collections-comms-collection-comms-core-python-20220207-111217-021377",
|
25
|
+
"_mesos_task_id": "ct:1644232337792:0:analyst-data-scripts-ca-collections-comms-collection-comms-core-python-20220207-111217-021377",
|
26
|
+
"host": "mesosslave-private-0077ac2089c041c6a",
|
27
|
+
"_msec": "981",
|
28
|
+
"short_message": "[65, 66]",
|
29
|
+
"level": 6
|
30
|
+
}
|
31
|
+
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-gelf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Funding Circle
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-02-
|
11
|
+
date: 2022-02-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: oj
|
@@ -133,6 +133,7 @@ files:
|
|
133
133
|
- lib/fluent/plugin/formatter_gelf.rb
|
134
134
|
- lib/fluent/plugin/gelf_plugin_util.rb
|
135
135
|
- lib/fluent/plugin/out_gelf.rb
|
136
|
+
- test/fixtures/array.json
|
136
137
|
- test/fixtures/docker_futureproof.json
|
137
138
|
- test/fixtures/docker_gelf_formatted.json
|
138
139
|
- test/fixtures/docker_gelf_formatted_already_extracted.json
|
@@ -172,6 +173,7 @@ signing_key:
|
|
172
173
|
specification_version: 4
|
173
174
|
summary: Graylog output plugin for fluentd
|
174
175
|
test_files:
|
176
|
+
- test/fixtures/array.json
|
175
177
|
- test/fixtures/docker_futureproof.json
|
176
178
|
- test/fixtures/docker_gelf_formatted.json
|
177
179
|
- test/fixtures/docker_gelf_formatted_already_extracted.json
|