Tag Normaliser
Fluentd Plugin to re-tag based on log metadata. More info at https://github.com/kube-logging/fluent-plugin-tag-normaliser
Available Kubernetes metadata
Parameter | Description | Example |
---|---|---|
${pod_name} | Pod name | understood-butterfly-logging-demo-7dcdcfdcd7-h7p9n |
${container_name} | Container name inside the Pod | logging-demo |
${namespace_name} | Namespace name | default |
${pod_id} | Kubernetes UUID for Pod | 1f50d309-45a6-11e9-b795-025000000001 |
${labels} | Kubernetes Pod labels. This is a nested map. You can access nested attributes via . | {"app":"logging-demo", "pod-template-hash":"7dcdcfdcd7" } |
${host} | Node hostname the Pod runs on | docker-desktop |
${docker_id} | Docker UUID of the container | 3a38148aa37aa3… |
Configuration
Tag Normaliser parameters
format (string, optional)
Re-Tag log messages info at github
Default: ${namespace_name}.${pod_name}.${container_name}
match_tag (string, optional)
Tag used in match directive.
Default: kubernetes.**
Example Parser
filter configurations
apiVersion: logging.banzaicloud.io/v1beta1
kind: Flow
metadata:
name: demo-flow
spec:
filters:
- tag_normaliser:
format: cluster1.${namespace_name}.${pod_name}.${labels.app}
selectors: {}
localOutputRefs:
- demo-output
Fluentd config result:
<match kubernetes.**>
@type tag_normaliser
@id test_tag_normaliser
format cluster1.${namespace_name}.${pod_name}.${labels.app}
</match>
Last modified November 21, 2024: Merge pull request #264 from kube-logging/avoid-empty-announcement-bar (dee354e)