-
Notifications
You must be signed in to change notification settings - Fork 326
How to add custom fields? #1097
-
Hi there
Sorry if this is a level-100 thing but I don't see any docs for it - my bad if I missed it.
I am looking to add custom field to our logs before they are shipped.
Specifically these (this is from the raw config of non-operator fluentbit):
[FILTER]
Name modify
Match *
Add applicationName ${Application_Name}
Add subsystemName ${SubSystem_Name}
Add computerName ${HOSTNAME}
Current ClusterFilter:
apiVersion: fluentbit.fluent.io/v1alpha2
kind: ClusterFilter
metadata:
name: custom-filter
labels:
fluentbit.fluent.io/enabled: "true"
fluentbit.fluent.io/mode: "k8s"
spec:
match: "*"
filters:
- nest:
operation: nest
wildcard:
- "*"
nestUnder: text
- <add field here?>
Any example or suggestions?
Thank you
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 2 comments
-
@wanjunlei @wenchajun Do we support this?
Beta Was this translation helpful? Give feedback.
All reactions
-
you can see https://github.com/fluent/fluent-operator/blob/master/apis/fluentbit/v1alpha2/plugins/filter/modify_types.go#L56
https://docs.fluentbit.io/manual/v/dev-2.2/pipeline/filters/modify
example https://github.com/fluent/fluent-operator/blob/master/manifests/logging-stack/filter-kubernetes.yaml#L23
Beta Was this translation helpful? Give feedback.