Skip to content

Commit 1ecd614

Browse files
authored
FluentD configuration: remove / in front of container names (ITISFoundation#1188)
1 parent 10bfcd6 commit 1ecd614

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

services/logging/fluentd/fluent.conf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,16 @@
4242
</record>
4343
</filter>
4444

45+
# Clean container names (Ruby needed) by removing leading slashes
46+
<filter docker.**>
47+
@type record_transformer
48+
enable_ruby true
49+
<record>
50+
container_name ${record["container_name"] ? record["container_name"].sub(/^\//, '') : record["container_name"]}
51+
</record>
52+
</filter>
53+
54+
4555
# Output to both Graylog (GELF) and Loki
4656
<match docker.**>
4757
@type copy

0 commit comments

Comments
 (0)