fluent-plugin-kubernetes_metadata_filter 2.13.0 → 3.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +0 -1
- data/Gemfile.lock +6 -6
- data/README.md +5 -52
- data/doc/benchmark/5m-1-2500lps-256b-baseline-01/cpu.png +0 -0
- data/doc/benchmark/5m-1-2500lps-256b-baseline-01/latency.png +0 -0
- data/doc/benchmark/5m-1-2500lps-256b-baseline-01/loss.png +0 -0
- data/doc/benchmark/5m-1-2500lps-256b-baseline-01/mem.png +0 -0
- data/doc/benchmark/5m-1-2500lps-256b-baseline-01/readme.md +88 -0
- data/doc/benchmark/5m-1-2500lps-256b-baseline-01/results.html +127 -0
- data/doc/benchmark/5m-1-2500lps-256b-kube-01-01/cpu.png +0 -0
- data/doc/benchmark/5m-1-2500lps-256b-kube-01-01/latency.png +0 -0
- data/doc/benchmark/5m-1-2500lps-256b-kube-01-01/loss.png +0 -0
- data/doc/benchmark/5m-1-2500lps-256b-kube-01-01/mem.png +0 -0
- data/doc/benchmark/5m-1-2500lps-256b-kube-01-01/readme.md +97 -0
- data/doc/benchmark/5m-1-2500lps-256b-kube-01-01/results.html +136 -0
- data/doc/benchmark/5m-1-2500lps-256b-kube-01-marshal-02/cpu.png +0 -0
- data/doc/benchmark/5m-1-2500lps-256b-kube-01-marshal-02/latency.png +0 -0
- data/doc/benchmark/5m-1-2500lps-256b-kube-01-marshal-02/loss.png +0 -0
- data/doc/benchmark/5m-1-2500lps-256b-kube-01-marshal-02/mem.png +0 -0
- data/doc/benchmark/5m-1-2500lps-256b-kube-01-marshal-02/readme.md +97 -0
- data/doc/benchmark/5m-1-2500lps-256b-kube-01-marshal-02/results.html +136 -0
- data/fluent-plugin-kubernetes_metadata_filter.gemspec +1 -1
- data/lib/fluent/plugin/filter_kubernetes_metadata.rb +15 -77
- data/lib/fluent/plugin/kubernetes_metadata_cache_strategy.rb +2 -2
- data/lib/fluent/plugin/kubernetes_metadata_common.rb +1 -16
- data/lib/fluent/plugin/kubernetes_metadata_stats.rb +16 -0
- data/lib/fluent/plugin/kubernetes_metadata_util.rb +0 -20
- data/lib/fluent/plugin/kubernetes_metadata_watch_pods.rb +1 -1
- data/test/plugin/test_filter_kubernetes_metadata.rb +23 -411
- metadata +20 -3
- data/test/plugin/test_utils.rb +0 -56
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d866c3ad5e90fce69d2f0d2f1e988cfbafe87ec8be406f9f694fba19ed2c89b
|
4
|
+
data.tar.gz: e952f47b62639f3afc4227647407fca4cbbbce166d97867894fb1e3f7402724c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 294b181f0cf88d4b70f3dd1e5d840b3c13e0a0c8a9adde9f970cc6d12797ccb2a2e7cb49bf411d12665dd58c7e70138ee29b258af6dce4d7d18e67ba782c466f
|
7
|
+
data.tar.gz: 1b5865080a46ee7a8f7c634f7154070ff751eb9bea51f974f922cfcd7c13945ee8ae1aff15ff08f79239718126c192efce3c6b9292928d749250c586912d1f64
|
data/.gitignore
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
fluent-plugin-kubernetes_metadata_filter (
|
4
|
+
fluent-plugin-kubernetes_metadata_filter (3.1.1)
|
5
5
|
fluentd (>= 0.14.0, < 1.16)
|
6
6
|
kubeclient (>= 4.0.0, < 5.0.0)
|
7
7
|
lru_redux
|
@@ -30,7 +30,7 @@ GEM
|
|
30
30
|
ffi-compiler (1.0.1)
|
31
31
|
ffi (>= 1.0.0)
|
32
32
|
rake
|
33
|
-
fluentd (1.15.
|
33
|
+
fluentd (1.15.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)
|
@@ -62,7 +62,7 @@ GEM
|
|
62
62
|
http_parser.rb (0.8.0)
|
63
63
|
jsonpath (1.1.2)
|
64
64
|
multi_json
|
65
|
-
kubeclient (4.
|
65
|
+
kubeclient (4.10.0)
|
66
66
|
http (>= 3.0, < 5.0)
|
67
67
|
jsonpath (~> 1.0)
|
68
68
|
recursive-open-struct (~> 1.1, >= 1.1.1)
|
@@ -73,7 +73,7 @@ GEM
|
|
73
73
|
mime-types-data (3.2022.0105)
|
74
74
|
mini_mime (1.1.2)
|
75
75
|
minitest (4.7.5)
|
76
|
-
msgpack (1.5.
|
76
|
+
msgpack (1.5.6)
|
77
77
|
multi_json (1.15.0)
|
78
78
|
netrc (0.11.0)
|
79
79
|
parallel (1.22.1)
|
@@ -120,9 +120,9 @@ GEM
|
|
120
120
|
test-unit-rr (1.0.5)
|
121
121
|
rr (>= 1.1.1)
|
122
122
|
test-unit (>= 2.5.2)
|
123
|
-
tzinfo (2.0.
|
123
|
+
tzinfo (2.0.5)
|
124
124
|
concurrent-ruby (~> 1.0)
|
125
|
-
tzinfo-data (1.2022.
|
125
|
+
tzinfo-data (1.2022.3)
|
126
126
|
tzinfo (>= 1.0.0)
|
127
127
|
unf (0.1.4)
|
128
128
|
unf_ext
|
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
|
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`)
|
@@ -67,10 +58,13 @@ when true (default: `true`)
|
|
67
58
|
* `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
59
|
* `skip_master_url` - Skip the master_url field from the metadata.
|
69
60
|
* `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.
|
61
|
+
* `stats_interval` - The interval to display cache stats (default: 30s). Set to 0 to disable stats collection and logging
|
70
62
|
* `watch_retry_interval` - The time interval in seconds for retry backoffs when watch connections fail. (default: `10`)
|
63
|
+
* `open_timeout` - The time in seconds to wait for a connection to kubernetes service. (default: `3`)
|
64
|
+
* `read_timeout` - The time in seconds to wait for a read from kubernetes service. (default: `10`)
|
71
65
|
|
72
66
|
|
73
|
-
Reading from
|
67
|
+
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
68
|
|
75
69
|
```
|
76
70
|
fluent-gem install fluent-plugin-multi-format-parser
|
@@ -111,35 +105,6 @@ The config block could look like this:
|
|
111
105
|
</match>
|
112
106
|
```
|
113
107
|
|
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
108
|
## Environment variables for Kubernetes
|
144
109
|
|
145
110
|
If the name of the Kubernetes node the plugin is running on is set as
|
@@ -199,18 +164,6 @@ Then output becomes as belows
|
|
199
164
|
}
|
200
165
|
```
|
201
166
|
|
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
167
|
## Contributing
|
215
168
|
|
216
169
|
1. Fork it
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -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
|
+
<system>
|
73
|
+
log_level debug
|
74
|
+
</system>
|
75
|
+
|
76
|
+
<source>
|
77
|
+
@type tail
|
78
|
+
@id container-input
|
79
|
+
path /var/log/pods/testhack-clwn63sc_*/loader-*/*
|
80
|
+
exclude_path ["/var/log/pods/**/*/*.gz","/var/log/pods/**/*/*.tmp"]
|
81
|
+
pos_file "/var/lib/fluentd/pos/containers-app"
|
82
|
+
refresh_interval 5
|
83
|
+
rotate_wait 5
|
84
|
+
tag kubernetes.*
|
85
|
+
read_from_head "true"
|
86
|
+
<parse>
|
87
|
+
@type regexp
|
88
|
+
expression /^(?<@timestamp>[^\s]+) (?<stream>stdout|stderr) (?<logtag>[F|P]) (?<message>.*)$/
|
89
|
+
time_format '%Y-%m-%dT%H:%M:%S.%N%:z'
|
90
|
+
keep_time_key true
|
91
|
+
</parse>
|
92
|
+
</source>
|
93
|
+
|
94
|
+
<filter kubernetes.**>
|
95
|
+
@type concat
|
96
|
+
key message
|
97
|
+
partial_key logtag
|
98
|
+
partial_value P
|
99
|
+
separator ''
|
100
|
+
</filter>
|
101
|
+
|
102
|
+
<match **>
|
103
|
+
@type forward
|
104
|
+
heartbeat_type none
|
105
|
+
keepalive true
|
106
|
+
|
107
|
+
<buffer>
|
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
|
+
</buffer>
|
118
|
+
|
119
|
+
<server>
|
120
|
+
host 0.0.0.0
|
121
|
+
port 24224
|
122
|
+
</server>
|
123
|
+
</match>
|
124
|
+
|
125
|
+
</code>
|
126
|
+
</div>
|
127
|
+
</html>
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -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
|
+
|
@@ -0,0 +1,136 @@
|
|
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>606542</td>
|
35
|
+
<td>256</td>
|
36
|
+
<td>5m0s</td>
|
37
|
+
<td>32.779</td>
|
38
|
+
<td>1.295</td>
|
39
|
+
<td>75.390</td>
|
40
|
+
<td>31.641</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>loader-0</td><td>0</td><td>606541</td><td>0</td><td>606542</td><td>100.0%</td><tr>
|
67
|
+
</table>
|
68
|
+
</div>
|
69
|
+
<div>
|
70
|
+
<code style="display:block;white-space:pre-wrap">
|
71
|
+
<system>
|
72
|
+
log_level debug
|
73
|
+
</system>
|
74
|
+
|
75
|
+
<source>
|
76
|
+
@type tail
|
77
|
+
@id container-input
|
78
|
+
path /var/log/pods/testhack-cyvquhgi_*/loader-*/*
|
79
|
+
exclude_path ["/var/log/pods/**/*/*.gz","/var/log/pods/**/*/*.tmp"]
|
80
|
+
pos_file "/var/lib/fluentd/pos/containers-app"
|
81
|
+
refresh_interval 5
|
82
|
+
rotate_wait 5
|
83
|
+
tag kubernetes.*
|
84
|
+
read_from_head "true"
|
85
|
+
<parse>
|
86
|
+
@type regexp
|
87
|
+
expression /^(?<@timestamp>[^\s]+) (?<stream>stdout|stderr) (?<logtag>[F|P]) (?<message>.*)$/
|
88
|
+
time_format '%Y-%m-%dT%H:%M:%S.%N%:z'
|
89
|
+
keep_time_key true
|
90
|
+
</parse>
|
91
|
+
</source>
|
92
|
+
|
93
|
+
<filter kubernetes.**>
|
94
|
+
@type concat
|
95
|
+
key message
|
96
|
+
partial_key logtag
|
97
|
+
partial_value P
|
98
|
+
separator ''
|
99
|
+
</filter>
|
100
|
+
|
101
|
+
<filter kubernetes.**>
|
102
|
+
@id kubernetes-metadata
|
103
|
+
@type kubernetes_metadata
|
104
|
+
kubernetes_url 'https://kubernetes.default.svc'
|
105
|
+
annotation_match ["^containerType\.logging\.openshift\.io\/.*$"]
|
106
|
+
allow_orphans false
|
107
|
+
cache_size '1000'
|
108
|
+
use_journal 'nil'
|
109
|
+
ssl_partial_chain 'true'
|
110
|
+
</filter>
|
111
|
+
|
112
|
+
<match **>
|
113
|
+
@type forward
|
114
|
+
heartbeat_type none
|
115
|
+
keepalive true
|
116
|
+
|
117
|
+
<buffer>
|
118
|
+
flush_mode interval
|
119
|
+
flush_interval 5s
|
120
|
+
flush_at_shutdown true
|
121
|
+
flush_thread_count 2
|
122
|
+
retry_type exponential_backoff
|
123
|
+
retry_wait 1s
|
124
|
+
retry_max_interval 60s
|
125
|
+
retry_forever true
|
126
|
+
overflow_action block
|
127
|
+
</buffer>
|
128
|
+
|
129
|
+
<server>
|
130
|
+
host 0.0.0.0
|
131
|
+
port 24224
|
132
|
+
</server>
|
133
|
+
</match>
|
134
|
+
</code>
|
135
|
+
</div>
|
136
|
+
</html>
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|