fluent-plugin-kubernetes_metadata_filter 2.13.0 → 3.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (34) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +0 -1
  3. data/Gemfile.lock +29 -28
  4. data/README.md +8 -52
  5. data/doc/benchmark/5m-1-2500lps-256b-baseline-01/cpu.png +0 -0
  6. data/doc/benchmark/5m-1-2500lps-256b-baseline-01/latency.png +0 -0
  7. data/doc/benchmark/5m-1-2500lps-256b-baseline-01/loss.png +0 -0
  8. data/doc/benchmark/5m-1-2500lps-256b-baseline-01/mem.png +0 -0
  9. data/doc/benchmark/5m-1-2500lps-256b-baseline-01/readme.md +88 -0
  10. data/doc/benchmark/5m-1-2500lps-256b-baseline-01/results.html +127 -0
  11. data/doc/benchmark/5m-1-2500lps-256b-kube-01-01/cpu.png +0 -0
  12. data/doc/benchmark/5m-1-2500lps-256b-kube-01-01/latency.png +0 -0
  13. data/doc/benchmark/5m-1-2500lps-256b-kube-01-01/loss.png +0 -0
  14. data/doc/benchmark/5m-1-2500lps-256b-kube-01-01/mem.png +0 -0
  15. data/doc/benchmark/5m-1-2500lps-256b-kube-01-01/readme.md +97 -0
  16. data/doc/benchmark/5m-1-2500lps-256b-kube-01-01/results.html +136 -0
  17. data/doc/benchmark/5m-1-2500lps-256b-kube-01-marshal-02/cpu.png +0 -0
  18. data/doc/benchmark/5m-1-2500lps-256b-kube-01-marshal-02/latency.png +0 -0
  19. data/doc/benchmark/5m-1-2500lps-256b-kube-01-marshal-02/loss.png +0 -0
  20. data/doc/benchmark/5m-1-2500lps-256b-kube-01-marshal-02/mem.png +0 -0
  21. data/doc/benchmark/5m-1-2500lps-256b-kube-01-marshal-02/readme.md +97 -0
  22. data/doc/benchmark/5m-1-2500lps-256b-kube-01-marshal-02/results.html +136 -0
  23. data/fluent-plugin-kubernetes_metadata_filter.gemspec +3 -3
  24. data/lib/fluent/plugin/filter_kubernetes_metadata.rb +27 -78
  25. data/lib/fluent/plugin/kubernetes_metadata_cache_strategy.rb +2 -2
  26. data/lib/fluent/plugin/kubernetes_metadata_common.rb +18 -20
  27. data/lib/fluent/plugin/kubernetes_metadata_stats.rb +16 -0
  28. data/lib/fluent/plugin/kubernetes_metadata_util.rb +0 -20
  29. data/lib/fluent/plugin/kubernetes_metadata_watch_pods.rb +1 -1
  30. data/test/cassettes/kubernetes_get_namespace_default.yml +4 -1
  31. data/test/cassettes/kubernetes_get_pod_with_ownerrefs.yml +156 -0
  32. data/test/plugin/test_filter_kubernetes_metadata.rb +146 -388
  33. metadata +26 -8
  34. data/test/plugin/test_utils.rb +0 -56
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c9c8ca7a91fa8c0fa0d87086c446978ed54afd901a635889cc9c0c6276258588
4
- data.tar.gz: a67192dc10a2ceda476cad7ee35e28973670603bd86aa6c083d47c7cbebf9b85
3
+ metadata.gz: 0754e97a3a06ac6c24eee7004490eb0e06bfb51f63a2c973e07d9edfc593a239
4
+ data.tar.gz: 340c6bdc268bc2ff009fd63e58ec460e043f65636d1a03f9a3726467e84821f5
5
5
  SHA512:
6
- metadata.gz: 4143d6376a80ba53f0cf1b9699d23d4862b9f748e927585694dbd942edec3d214989c59a1cfd90bd7b02379ee5beeea3a01a9d7ec5947752e8e1e1becb2e7bd5
7
- data.tar.gz: 12b6b13c20272ca6d285856a816b52ddffa92ac53b93a91222adb8e9f0be07d1a21808d61c2d4364473e0be57b1f4af6414627cca9a08ce88143e02b2f4bc7b1
6
+ metadata.gz: de4fa7d241b0b7efacd1cde9e2c18c0bb3c8553d13e13528e9ccc16aa3ab974c12b1a88ce43a7bd186c9060d29ba649f8aa0365c3a9ecc4eed2c2354e1092dc9
7
+ data.tar.gz: 02ca1c7a7703e85962e206571b25a8416be206ef18d706958dfc894c598a068727e53abb3bd3beb059f1245211f957072b0b4c38a21a9d4c1ed114286306ffc9
data/.gitignore CHANGED
@@ -7,7 +7,6 @@ vendor/
7
7
  InstalledFiles
8
8
  _yardoc
9
9
  coverage
10
- doc/
11
10
  lib/bundler/man
12
11
  pkg
13
12
  rdoc
data/Gemfile.lock CHANGED
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fluent-plugin-kubernetes_metadata_filter (2.13.0)
5
- fluentd (>= 0.14.0, < 1.16)
4
+ fluent-plugin-kubernetes_metadata_filter (3.4.0)
5
+ fluentd (>= 0.14.0, < 1.17)
6
6
  kubeclient (>= 4.0.0, < 5.0.0)
7
7
  lru_redux
8
8
 
@@ -16,8 +16,8 @@ GEM
16
16
  charlock_holmes (0.7.7)
17
17
  codeclimate-test-reporter (0.6.0)
18
18
  simplecov (>= 0.7.1, < 1.0.0)
19
- concurrent-ruby (1.1.10)
20
- cool.io (1.7.1)
19
+ concurrent-ruby (1.2.2)
20
+ cool.io (1.8.0)
21
21
  copyright-header (1.0.22)
22
22
  github-linguist
23
23
  crack (0.4.5)
@@ -26,21 +26,21 @@ GEM
26
26
  domain_name (0.5.20190701)
27
27
  unf (>= 0.0.5, < 1.0.0)
28
28
  escape_utils (1.2.2)
29
- ffi (1.15.5)
29
+ ffi (1.16.2)
30
30
  ffi-compiler (1.0.1)
31
31
  ffi (>= 1.0.0)
32
32
  rake
33
- fluentd (1.15.0)
33
+ fluentd (1.16.2)
34
34
  bundler
35
35
  cool.io (>= 1.4.5, < 2.0.0)
36
36
  http_parser.rb (>= 0.5.1, < 0.9.0)
37
37
  msgpack (>= 1.3.1, < 2.0.0)
38
- serverengine (>= 2.3.0, < 3.0.0)
39
- sigdump (~> 0.2.2)
38
+ serverengine (>= 2.3.2, < 3.0.0)
39
+ sigdump (~> 0.2.5)
40
40
  strptime (>= 0.2.4, < 1.0.0)
41
41
  tzinfo (>= 1.0, < 3.0)
42
42
  tzinfo-data (~> 1.0)
43
- webrick (>= 1.4.2, < 1.8.0)
43
+ webrick (~> 1.4)
44
44
  yajl-ruby (~> 1.0)
45
45
  github-linguist (7.21.0)
46
46
  charlock_holmes (~> 0.7.7)
@@ -48,38 +48,39 @@ GEM
48
48
  mini_mime (~> 1.0)
49
49
  rugged (~> 1.0)
50
50
  hashdiff (1.0.1)
51
- http (4.4.1)
52
- addressable (~> 2.3)
51
+ http (5.1.1)
52
+ addressable (~> 2.8)
53
53
  http-cookie (~> 1.0)
54
54
  http-form_data (~> 2.2)
55
- http-parser (~> 1.2.0)
55
+ llhttp-ffi (~> 0.4.0)
56
56
  http-accept (1.7.0)
57
57
  http-cookie (1.0.5)
58
58
  domain_name (~> 0.5)
59
59
  http-form_data (2.3.0)
60
- http-parser (1.2.3)
61
- ffi-compiler (>= 1.0, < 2.0)
62
60
  http_parser.rb (0.8.0)
63
- jsonpath (1.1.2)
61
+ jsonpath (1.1.4)
64
62
  multi_json
65
- kubeclient (4.9.3)
66
- http (>= 3.0, < 5.0)
63
+ kubeclient (4.11.0)
64
+ http (>= 3.0, < 6.0)
67
65
  jsonpath (~> 1.0)
68
66
  recursive-open-struct (~> 1.1, >= 1.1.1)
69
67
  rest-client (~> 2.0)
68
+ llhttp-ffi (0.4.0)
69
+ ffi-compiler (~> 1.0)
70
+ rake (~> 13.0)
70
71
  lru_redux (1.1.0)
71
- mime-types (3.4.1)
72
+ mime-types (3.5.1)
72
73
  mime-types-data (~> 3.2015)
73
- mime-types-data (3.2022.0105)
74
+ mime-types-data (3.2023.0808)
74
75
  mini_mime (1.1.2)
75
76
  minitest (4.7.5)
76
- msgpack (1.5.3)
77
+ msgpack (1.7.2)
77
78
  multi_json (1.15.0)
78
79
  netrc (0.11.0)
79
80
  parallel (1.22.1)
80
81
  parser (3.1.2.0)
81
82
  ast (~> 2.4.1)
82
- power_assert (2.0.1)
83
+ power_assert (2.0.2)
83
84
  public_suffix (4.0.7)
84
85
  rainbow (3.1.1)
85
86
  rake (13.0.6)
@@ -105,9 +106,9 @@ GEM
105
106
  parser (>= 3.1.1.0)
106
107
  ruby-progressbar (1.11.0)
107
108
  rugged (1.4.3)
108
- serverengine (2.3.0)
109
+ serverengine (2.3.2)
109
110
  sigdump (~> 0.2.2)
110
- sigdump (0.2.4)
111
+ sigdump (0.2.5)
111
112
  simplecov (0.21.2)
112
113
  docile (~> 1.1)
113
114
  simplecov-html (~> 0.11)
@@ -115,14 +116,14 @@ GEM
115
116
  simplecov-html (0.12.3)
116
117
  simplecov_json_formatter (0.1.4)
117
118
  strptime (0.2.5)
118
- test-unit (3.0.9)
119
+ test-unit (3.5.5)
119
120
  power_assert
120
121
  test-unit-rr (1.0.5)
121
122
  rr (>= 1.1.1)
122
123
  test-unit (>= 2.5.2)
123
- tzinfo (2.0.4)
124
+ tzinfo (2.0.6)
124
125
  concurrent-ruby (~> 1.0)
125
- tzinfo-data (1.2022.1)
126
+ tzinfo-data (1.2023.3)
126
127
  tzinfo (>= 1.0.0)
127
128
  unf (0.1.4)
128
129
  unf_ext
@@ -133,7 +134,7 @@ GEM
133
134
  addressable (>= 2.8.0)
134
135
  crack (>= 0.3.2)
135
136
  hashdiff (>= 0.4.0, < 2.0.0)
136
- webrick (1.7.0)
137
+ webrick (1.8.1)
137
138
  yajl-ruby (1.4.3)
138
139
 
139
140
  PLATFORMS
@@ -148,7 +149,7 @@ DEPENDENCIES
148
149
  minitest (~> 4.0)
149
150
  rake
150
151
  rubocop
151
- test-unit (~> 3.0.2)
152
+ test-unit (~> 3.5.5)
152
153
  test-unit-rr (~> 1.0.3)
153
154
  vcr
154
155
  webmock
data/README.md CHANGED
@@ -7,8 +7,7 @@
7
7
 
8
8
  The Kubernetes metadata plugin filter enriches container log records with pod and namespace metadata.
9
9
 
10
- This plugin derives basic metadata about the container that emitted a given log record using the source of the log record. Records from journald provide metadata about the
11
- container environment as named fields. Records from JSON files encode metadata about the container in the file name. The initial metadata derived from the source is used
10
+ This plugin derives basic metadata about the container that emitted a given log record using the source of the log record. Records from kubernetes containers encode metadata about the container in the file name. The initial metadata derived from the source is used
12
11
  to lookup additional metadata about the container's associated pod and namespace (e.g. UUIDs, labels, annotations) when the kubernetes_url is configured. If the plugin cannot
13
12
  authoritatively determine the namespace of the container emitting a log record, it will use an 'orphan' namespace ID in the metadata. This behaviors supports multi-tenant systems
14
13
  that rely on the authenticity of the namespace for proper log isolation.
@@ -46,14 +45,6 @@ This must use named capture groups for `container_name`, `pod_name`, `namespace`
46
45
  * `cache_size` - size of the cache of Kubernetes metadata to reduce requests to the API server (default: `1000`)
47
46
  * `cache_ttl` - TTL in seconds of each cached element. Set to negative value to disable TTL eviction (default: `3600` - 1 hour)
48
47
  * `watch` - set up a watch on pods on the API server for updates to metadata (default: `true`)
49
- * *DEPRECATED*`de_dot` - replace dots in labels and annotations with configured `de_dot_separator`, required for Datadog and ElasticSearch 2.x compatibility (default: `true`)
50
- * *DEPRECATED*`de_dot_separator` - separator to use if `de_dot` is enabled (default: `_`)
51
- * *DEPRECATED*`de_slash` - replace slashes in labels and annotations with configured `de_slash_separator`, required for Datadog compatibility (default: `false`)
52
- * *DEPRECATED*`de_slash_separator` - separator to use if `de_slash` is enabled (default: `__`)
53
- * *DEPRECATED* `use_journal` - If false, messages are expected to be formatted and tagged as if read by the fluentd in\_tail plugin with wildcard filename. If true, messages are expected to be formatted as if read from the systemd journal. The `MESSAGE` field has the full message. The `CONTAINER_NAME` field has the encoded k8s metadata (see below). The `CONTAINER_ID_FULL` field has the full container uuid. This requires docker to use the `--log-driver=journald` log driver. If unset (the default), the plugin will use the `CONTAINER_NAME` and `CONTAINER_ID_FULL` fields
54
- if available, otherwise, will use the tag in the `tag_to_kubernetes_name_regexp` format.
55
- * `container_name_to_kubernetes_regexp` - The regular expression used to extract the k8s metadata encoded in the journal `CONTAINER_NAME` field default: See [code](https://github.com/fabric8io/fluent-plugin-kubernetes_metadata_filter/blob/master/lib/fluent/plugin/filter_kubernetes_metadata.rb#L68)
56
- * This corresponds to the definition [in the source](https://github.com/kubernetes/kubernetes/blob/release-1.6/pkg/kubelet/dockertools/docker.go#L317)
57
48
  * `annotation_match` - Array of regular expressions matching annotation field names. Matched annotations are added to a log record.
58
49
  * `allow_orphans` - Modify the namespace and namespace id to the values of `orphaned_namespace_name` and `orphaned_namespace_id`
59
50
  when true (default: `true`)
@@ -64,13 +55,19 @@ when true (default: `true`)
64
55
  to trust the intermediate CA certs we do have, set this to `true` - this corresponds to
65
56
  the `openssl s_client -partial_chain` flag and `X509_V_FLAG_PARTIAL_CHAIN` (default: `false`)
66
57
  * `skip_labels` - Skip all label fields from the metadata.
58
+ * `skip_pod_labels` - Skip only pod label fields from the metadata.
59
+ * `skip_namespace_labels` - Skip only namespace label fields from the metadata.
67
60
  * `skip_container_metadata` - Skip some of the container data of the metadata. The metadata will not contain the container_image and container_image_id fields.
68
61
  * `skip_master_url` - Skip the master_url field from the metadata.
69
62
  * `skip_namespace_metadata` - Skip the namespace_id field from the metadata. The fetch_namespace_metadata function will be skipped. The plugin will be faster and cpu consumption will be less.
63
+ * `stats_interval` - The interval to display cache stats (default: 30s). Set to 0 to disable stats collection and logging
70
64
  * `watch_retry_interval` - The time interval in seconds for retry backoffs when watch connections fail. (default: `10`)
65
+ * `open_timeout` - The time in seconds to wait for a connection to kubernetes service. (default: `3`)
66
+ * `read_timeout` - The time in seconds to wait for a read from kubernetes service. (default: `10`)
67
+ * `include_ownerrefs_metadata` - If set to true, it will include metadata (`kind` & `name`) in `kubernetes.ownerrefs` about the controller that owns the pod. (default: `false`)
71
68
 
72
69
 
73
- Reading from the JSON formatted log files with `in_tail` and wildcard filenames while respecting the CRI-o log format with the same config you need the fluent-plugin "multi-format-parser":
70
+ Reading from a JSON formatted log files with `in_tail` and wildcard filenames while respecting the CRI-o log format with the same config you need the fluent-plugin "multi-format-parser":
74
71
 
75
72
  ```
76
73
  fluent-gem install fluent-plugin-multi-format-parser
@@ -111,35 +108,6 @@ The config block could look like this:
111
108
  </match>
112
109
  ```
113
110
 
114
- Reading from the systemd journal (requires the fluentd `fluent-plugin-systemd` and `systemd-journal` plugins, and requires docker to use the `--log-driver=journald` log driver):
115
- ```
116
- <source>
117
- @type systemd
118
- path /run/log/journal
119
- pos_file journal.pos
120
- tag journal
121
- read_from_head true
122
- </source>
123
-
124
- # probably want to use something like fluent-plugin-rewrite-tag-filter to
125
- # retag entries from k8s
126
- <match journal>
127
- @type rewrite_tag_filter
128
- rewriterule1 CONTAINER_NAME ^k8s_ kubernetes.journal.container
129
- ...
130
- </match>
131
-
132
- <filter kubernetes.**>
133
- @type kubernetes_metadata
134
- use_journal true
135
- </filter>
136
-
137
- <match **>
138
- @type stdout
139
- </match>
140
- ```
141
-
142
-
143
111
  ## Environment variables for Kubernetes
144
112
 
145
113
  If the name of the Kubernetes node the plugin is running on is set as
@@ -199,18 +167,6 @@ Then output becomes as belows
199
167
  }
200
168
  ```
201
169
 
202
- If using journal input, from docker configured with `--log-driver=journald`, the input looks like the `journalctl -o export` format:
203
- ```
204
- # The stream identification is encoded into the PRIORITY field as an
205
- # integer: 6, or github.com/coreos/go-systemd/journal.Info, marks stdout,
206
- # while 3, or github.com/coreos/go-systemd/journal.Err, marks stderr.
207
- PRIORITY=6
208
- CONTAINER_ID=b6cbb6e73c0a
209
- CONTAINER_ID_FULL=b6cbb6e73c0ad63ab820e4baa97cdc77cec729930e38a714826764ac0491341a
210
- CONTAINER_NAME=k8s_registry.a49f5318_docker-registry-1-hhoj0_default_ae3a9bdc-1f66-11e6-80a2-fa163e2fff3a_799e4035
211
- MESSAGE=172.17.0.1 - - [21/May/2016:16:52:05 +0000] "GET /healthz HTTP/1.1" 200 0 "" "Go-http-client/1.1"
212
- ```
213
-
214
170
  ## Contributing
215
171
 
216
172
  1. Fork it
@@ -0,0 +1,88 @@
1
+
2
+ # collector Functionl Benchmark Results
3
+ ## Options
4
+ * Image: quay.io/openshift-logging/fluentd:1.14.6
5
+ * Total Log Stressors: 1
6
+ * Lines Per Second: 2500
7
+ * Run Duration: 5m
8
+ * Payload Source: synthetic
9
+
10
+ ## Latency of logs collected based on the time the log was generated and ingested
11
+
12
+ Total Msg| Size | Elapsed (s) | Mean (s)| Min(s) | Max (s)| Median (s)
13
+ ---------|------|-------------|---------|--------|--------|---
14
+ 705733|256|5m0s|16.929|1.826|36.399|14.956
15
+
16
+ ![](cpu.png)
17
+
18
+ ![](mem.png)
19
+
20
+ ![](latency.png)
21
+
22
+ ![](loss.png)
23
+
24
+ ## Percent logs lost between first and last collected sequence ids
25
+ Stream | Min Seq | Max Seq | Purged | Collected | Percent Collected |
26
+ -------| ---------| --------| -------|-----------|--------------|
27
+ | functional.0.0000000000000000DBCED7977B8F643F|0|716850|0|705733|98.4%
28
+
29
+
30
+ ## Config
31
+
32
+ ```
33
+
34
+ <system>
35
+ log_level debug
36
+ </system>
37
+
38
+ <source>
39
+ @type tail
40
+ @id container-input
41
+ path /var/log/pods/testhack-clwn63sc_*/loader-*/*
42
+ exclude_path ["/var/log/pods/**/*/*.gz","/var/log/pods/**/*/*.tmp"]
43
+ pos_file "/var/lib/fluentd/pos/containers-app"
44
+ refresh_interval 5
45
+ rotate_wait 5
46
+ tag kubernetes.*
47
+ read_from_head "true"
48
+ <parse>
49
+ @type regexp
50
+ expression /^(?<@timestamp>[^\s]+) (?<stream>stdout|stderr) (?<logtag>[F|P]) (?<message>.*)$/
51
+ time_format '%Y-%m-%dT%H:%M:%S.%N%:z'
52
+ keep_time_key true
53
+ </parse>
54
+ </source>
55
+
56
+ <filter kubernetes.**>
57
+ @type concat
58
+ key message
59
+ partial_key logtag
60
+ partial_value P
61
+ separator ''
62
+ </filter>
63
+
64
+ <match **>
65
+ @type forward
66
+ heartbeat_type none
67
+ keepalive true
68
+
69
+ <buffer>
70
+ flush_mode interval
71
+ flush_interval 5s
72
+ flush_at_shutdown true
73
+ flush_thread_count 2
74
+ retry_type exponential_backoff
75
+ retry_wait 1s
76
+ retry_max_interval 60s
77
+ retry_forever true
78
+ overflow_action block
79
+ </buffer>
80
+
81
+ <server>
82
+ host 0.0.0.0
83
+ port 24224
84
+ </server>
85
+ </match>
86
+
87
+ ```
88
+
@@ -0,0 +1,127 @@
1
+
2
+ <html>
3
+ <div>
4
+ <div><b>Options</b><div>
5
+ <div>Image: quay.io/openshift-logging/fluentd:1.14.6</div>
6
+ <div>Total Log Stressors: 1</div>
7
+ <div>Lines Per Second: 2500</div>
8
+ <div>Run Duration: 5m</div>
9
+ <div>Payload Source: synthetic</div>
10
+ </div>
11
+ <div>
12
+ Latency of logs collected based on the time the log was generated and ingested
13
+ </div>
14
+ <table border="1">
15
+ <tr>
16
+ <th>Total</th>
17
+ <th>Size</th>
18
+ <th>Elapsed</th>
19
+ <th>Mean</th>
20
+ <th>Min</th>
21
+ <th>Max</th>
22
+ <th>Median</th>
23
+ </tr>
24
+ <tr>
25
+ <th>Msg</th>
26
+ <th></th>
27
+ <th>(s)</th>
28
+ <th>(s)</th>
29
+ <th>(s)</th>
30
+ <th>(s)</th>
31
+ <th>(s)</th>
32
+ </tr>
33
+ <tr>
34
+ <td>705733</td>
35
+ <td>256</td>
36
+ <td>5m0s</td>
37
+ <td>16.929</td>
38
+ <td>1.826</td>
39
+ <td>36.399</td>
40
+ <td>14.956</td>
41
+ </tr>
42
+ </table>
43
+ <div>
44
+ <img src="cpu.png">
45
+ </div>
46
+ <div>
47
+ <img src="mem.png">
48
+ </div>
49
+ <div>
50
+ <img src="latency.png">
51
+ </div>
52
+ <div>
53
+ <img src="loss.png">
54
+ </div>
55
+ <div>
56
+ <table border="1">
57
+ <tr>
58
+ <th>Stream</th>
59
+ <th>Min Seq</th>
60
+ <th>Max Seq</th>
61
+ <th>Purged</th>
62
+ <th>Collected</th>
63
+ <th>Percent Collected</th>
64
+ </tr>
65
+ <tr>
66
+ <tr><td>functional.0.0000000000000000DBCED7977B8F643F</td><td>0</td><td>716850</td><td>0</td><td>705733</td><td>98.4%</td><tr>
67
+ </table>
68
+ </div>
69
+ <div>
70
+ <code style="display:block;white-space:pre-wrap">
71
+
72
+ &lt;system&gt;
73
+ log_level debug
74
+ &lt;/system&gt;
75
+
76
+ &lt;source&gt;
77
+ @type tail
78
+ @id container-input
79
+ path /var/log/pods/testhack-clwn63sc_*/loader-*/*
80
+ exclude_path [&#34;/var/log/pods/**/*/*.gz&#34;,&#34;/var/log/pods/**/*/*.tmp&#34;]
81
+ pos_file &#34;/var/lib/fluentd/pos/containers-app&#34;
82
+ refresh_interval 5
83
+ rotate_wait 5
84
+ tag kubernetes.*
85
+ read_from_head &#34;true&#34;
86
+ &lt;parse&gt;
87
+ @type regexp
88
+ expression /^(?&lt;@timestamp&gt;[^\s]+) (?&lt;stream&gt;stdout|stderr) (?&lt;logtag&gt;[F|P]) (?&lt;message&gt;.*)$/
89
+ time_format &#39;%Y-%m-%dT%H:%M:%S.%N%:z&#39;
90
+ keep_time_key true
91
+ &lt;/parse&gt;
92
+ &lt;/source&gt;
93
+
94
+ &lt;filter kubernetes.**&gt;
95
+ @type concat
96
+ key message
97
+ partial_key logtag
98
+ partial_value P
99
+ separator &#39;&#39;
100
+ &lt;/filter&gt;
101
+
102
+ &lt;match **&gt;
103
+ @type forward
104
+ heartbeat_type none
105
+ keepalive true
106
+
107
+ &lt;buffer&gt;
108
+ flush_mode interval
109
+ flush_interval 5s
110
+ flush_at_shutdown true
111
+ flush_thread_count 2
112
+ retry_type exponential_backoff
113
+ retry_wait 1s
114
+ retry_max_interval 60s
115
+ retry_forever true
116
+ overflow_action block
117
+ &lt;/buffer&gt;
118
+
119
+ &lt;server&gt;
120
+ host 0.0.0.0
121
+ port 24224
122
+ &lt;/server&gt;
123
+ &lt;/match&gt;
124
+
125
+ </code>
126
+ </div>
127
+ </html>
@@ -0,0 +1,97 @@
1
+
2
+ # collector Functionl Benchmark Results
3
+ ## Options
4
+ * Image: quay.io/openshift-logging/fluentd:1.14.6
5
+ * Total Log Stressors: 1
6
+ * Lines Per Second: 2500
7
+ * Run Duration: 5m
8
+ * Payload Source: synthetic
9
+
10
+ ## Latency of logs collected based on the time the log was generated and ingested
11
+
12
+ Total Msg| Size | Elapsed (s) | Mean (s)| Min(s) | Max (s)| Median (s)
13
+ ---------|------|-------------|---------|--------|--------|---
14
+ 606542|256|5m0s|32.779|1.295|75.390|31.641
15
+
16
+ ![](cpu.png)
17
+
18
+ ![](mem.png)
19
+
20
+ ![](latency.png)
21
+
22
+ ![](loss.png)
23
+
24
+ ## Percent logs lost between first and last collected sequence ids
25
+ Stream | Min Seq | Max Seq | Purged | Collected | Percent Collected |
26
+ -------| ---------| --------| -------|-----------|--------------|
27
+ | loader-0|0|606541|0|606542|100.0%
28
+
29
+
30
+ ## Config
31
+
32
+ ```
33
+ <system>
34
+ log_level debug
35
+ </system>
36
+
37
+ <source>
38
+ @type tail
39
+ @id container-input
40
+ path /var/log/pods/testhack-cyvquhgi_*/loader-*/*
41
+ exclude_path ["/var/log/pods/**/*/*.gz","/var/log/pods/**/*/*.tmp"]
42
+ pos_file "/var/lib/fluentd/pos/containers-app"
43
+ refresh_interval 5
44
+ rotate_wait 5
45
+ tag kubernetes.*
46
+ read_from_head "true"
47
+ <parse>
48
+ @type regexp
49
+ expression /^(?<@timestamp>[^\s]+) (?<stream>stdout|stderr) (?<logtag>[F|P]) (?<message>.*)$/
50
+ time_format '%Y-%m-%dT%H:%M:%S.%N%:z'
51
+ keep_time_key true
52
+ </parse>
53
+ </source>
54
+
55
+ <filter kubernetes.**>
56
+ @type concat
57
+ key message
58
+ partial_key logtag
59
+ partial_value P
60
+ separator ''
61
+ </filter>
62
+
63
+ <filter kubernetes.**>
64
+ @id kubernetes-metadata
65
+ @type kubernetes_metadata
66
+ kubernetes_url 'https://kubernetes.default.svc'
67
+ annotation_match ["^containerType\.logging\.openshift\.io\/.*$"]
68
+ allow_orphans false
69
+ cache_size '1000'
70
+ use_journal 'nil'
71
+ ssl_partial_chain 'true'
72
+ </filter>
73
+
74
+ <match **>
75
+ @type forward
76
+ heartbeat_type none
77
+ keepalive true
78
+
79
+ <buffer>
80
+ flush_mode interval
81
+ flush_interval 5s
82
+ flush_at_shutdown true
83
+ flush_thread_count 2
84
+ retry_type exponential_backoff
85
+ retry_wait 1s
86
+ retry_max_interval 60s
87
+ retry_forever true
88
+ overflow_action block
89
+ </buffer>
90
+
91
+ <server>
92
+ host 0.0.0.0
93
+ port 24224
94
+ </server>
95
+ </match>
96
+ ```
97
+