fluent-plugin-sekoia-io 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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e8af0c1aef96bac53191fad9c93c566197e20288a0cb9f8cb64c5fa1869d1180
|
4
|
+
data.tar.gz: dc5fe425de2e95e921cc1adbc94fa634749f6b0c1bb9b1b432f63fb019c94ada
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ff8d7fee2a2fe327b9bbd233c2598d9fcf6c352d244e6b7cd735d882ed411421b27916e8a96d7071579009aff891d1dfa470c3ab3a523ea8b65ac8bd48690ba
|
7
|
+
data.tar.gz: ebfabc6d2b1d9427e35bc6963a5e806f56aae16369d815c7486829c295ecd05a62777c805c9b98409684867716c3c824701c44ea005edfd10f69240b585f2042
|
data/README.md
CHANGED
@@ -38,8 +38,8 @@ Or install it yourself as:
|
|
38
38
|
|
39
39
|
| name | type | description |
|
40
40
|
| -------------- | ------- | --------------------------------- |
|
41
|
-
| host | string | syslog target host
|
42
|
-
| port | integer | syslog target port
|
41
|
+
| host | string | syslog target host (default: intake.sekoia.io) |
|
42
|
+
| port | integer | syslog target port (default: 10514) |
|
43
43
|
| transport | string | transport protocol (tls [default], udp, or tcp) |
|
44
44
|
| insecure | boolean | skip ssl validation |
|
45
45
|
| trusted_ca_path | string | file path to ca to trust |
|
@@ -50,7 +50,7 @@ Defaults to `sekoia`
|
|
50
50
|
|
51
51
|
| name | type | description |
|
52
52
|
| -------------- | ------- | ------- |
|
53
|
-
| rfc6587_message_size | boolean | prepends message length for syslog transmission (
|
53
|
+
| rfc6587_message_size | boolean | prepends message length for syslog transmission (true by default) |
|
54
54
|
| app_name_field | string | sets app name in syslog from field in fluentd, delimited by '.' (default kubernetes.labels.app) |
|
55
55
|
| proc_id_field | string | sets proc id in syslog from field in fluentd, delimited by '.' (default kubernete.pod_name) |
|
56
56
|
| intake_key_field | string | sets intake_key in structured data for sekoia.io. delimited by '.' (default kubernetes.annotations.sekoia-io-intake-key) |
|
@@ -5,7 +5,7 @@ module Fluent
|
|
5
5
|
class FormatterSEKOIA < Formatter
|
6
6
|
Fluent::Plugin.register_formatter('sekoia', self)
|
7
7
|
|
8
|
-
config_param :rfc6587_message_size, :bool, default:
|
8
|
+
config_param :rfc6587_message_size, :bool, default: true
|
9
9
|
config_param :app_name_field, :string, default: "kubernetes.labels.app"
|
10
10
|
config_param :proc_id_field, :string, default: "kubernetes.pod_name"
|
11
11
|
config_param :intake_key_field, :string, default: "kubernetes.annotations.sekoia-io-intake-key"
|
@@ -13,6 +13,7 @@ class FormatterSEKOIATest < Test::Unit::TestCase
|
|
13
13
|
def test_format_default
|
14
14
|
formatter_driver = create_driver %(
|
15
15
|
@type sekoia
|
16
|
+
rfc6587_message_size false
|
16
17
|
)
|
17
18
|
tag = "test-formatter"
|
18
19
|
time = Fluent::EventTime.new(0, 123456000)
|
@@ -24,6 +25,7 @@ class FormatterSEKOIATest < Test::Unit::TestCase
|
|
24
25
|
def test_format_without_message_size
|
25
26
|
formatter_driver = create_driver %(
|
26
27
|
@type sekoia
|
28
|
+
rfc6587_message_size false
|
27
29
|
)
|
28
30
|
tag = "test-formatter"
|
29
31
|
time = Fluent::EventTime.new(0, 123456000)
|
@@ -50,6 +52,7 @@ class FormatterSEKOIATest < Test::Unit::TestCase
|
|
50
52
|
def test_format_with_app_name
|
51
53
|
formatter_driver = create_driver %(
|
52
54
|
@type sekoia
|
55
|
+
rfc6587_message_size false
|
53
56
|
app_name_field example.custom_field
|
54
57
|
)
|
55
58
|
tag = "test-formatter"
|
@@ -64,6 +67,7 @@ class FormatterSEKOIATest < Test::Unit::TestCase
|
|
64
67
|
def test_format_with_proc_id
|
65
68
|
formatter_driver = create_driver %(
|
66
69
|
@type sekoia
|
70
|
+
rfc6587_message_size false
|
67
71
|
proc_id_field example.custom_field
|
68
72
|
)
|
69
73
|
tag = "test-formatter"
|
@@ -78,6 +82,7 @@ class FormatterSEKOIATest < Test::Unit::TestCase
|
|
78
82
|
def test_format_with_intake_key
|
79
83
|
formatter_driver = create_driver %(
|
80
84
|
@type sekoia
|
85
|
+
rfc6587_message_size false
|
81
86
|
app_name_field example.custom_field
|
82
87
|
intake_key_field field.intake_key
|
83
88
|
)
|
@@ -114,8 +119,9 @@ class FormatterSEKOIATest < Test::Unit::TestCase
|
|
114
119
|
}
|
115
120
|
}
|
116
121
|
}
|
117
|
-
formatted_message = "<14>1 1970-01-01T00:00:00.123456+00:00 - test - - [SEKOIA@53288 intake_key=\"1234\"] test-log
|
118
|
-
|
122
|
+
formatted_message = "<14>1 1970-01-01T00:00:00.123456+00:00 - test - - [SEKOIA@53288 intake_key=\"1234\"] test-log"
|
123
|
+
message_size = formatted_message.length
|
124
|
+
assert_equal "#{message_size} #{formatted_message}",
|
119
125
|
formatter_driver.instance.format(tag, time, record)
|
120
126
|
end
|
121
127
|
|
@@ -5,7 +5,7 @@ class OutSyslogSEKOIATest < Test::Unit::TestCase
|
|
5
5
|
def setup
|
6
6
|
Fluent::Test.setup
|
7
7
|
@time = Fluent::EventTime.new(0, 123456)
|
8
|
-
@formatted_log = "<14>1 1970-01-01T00:00:00.000123+00:00 - - - - [SEKOIA@53288 intake_key=\"\"] hi
|
8
|
+
@formatted_log = "78 <14>1 1970-01-01T00:00:00.000123+00:00 - - - - [SEKOIA@53288 intake_key=\"\"] hi"
|
9
9
|
end
|
10
10
|
|
11
11
|
def create_driver(conf = CONFIG)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-sekoia-io
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pivotal
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-04-
|
11
|
+
date: 2020-04-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|