Filter
fluentd.fluent.io / v1alpha1
apiVersion: fluentd.fluent.io/v1alpha1
kind: Filter
metadata:
name: example
apiVersion
string
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
kind
string
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
metadata
object
spec object
FilterSpec defines the desired state of Filter
filters []object
customPlugin object
Custom plugin type
config
string required
grep object
The filter_grep filter plugin
and []object
exclude object
Exclude defines the parameters for the exclude plugin
key
string
pattern
string
regexp object
Regexp defines the parameters for the regexp plugin
key
string
pattern
string
exclude []object
key
string
pattern
string
or []object
exclude object
Exclude defines the parameters for the exclude plugin
key
string
pattern
string
regexp object
Regexp defines the parameters for the regexp plugin
key
string
pattern
string
regexp []object
key
string
pattern
string
logLevel
string
The @log_level parameter specifies the plugin-specific logging level
parser object
The filter_parser filter plugin
emitInvalidRecordToError
boolean
Emits invalid record to @ERROR label. Invalid cases are: key does not exist;the format is not matched;an unexpected error.
If you want to ignore these errors, set false.
hashValueField
string
Stores the parsed values as a hash value in a field.
injectKeyPrefix
string
Stores the parsed values with the specified key name prefix.
keyName
string required
Specifies the field name in the record to parse. Required parameter.
i.e: If set keyName to log, {"key":"value","log":"{\"time\":1622473200,\"user\":1}"} => {"user":1}
parse object required
Parse defines various parameters for the parse plugin
customPatternPath
string
Path to the file that includes custom grok patterns.
estimateCurrentEvent
boolean
If true, use Fluent::Eventnow(current time) as a timestamp when time_key is specified.
expression
string
Specifies the regular expression for matching logs. Regular expression also supports i and m suffix.
grok []object
Grok Sections
keepTimeKey
boolean
If true, keep time field in the record.
name
string
The name of this grok section.
pattern
string
The pattern of grok. Required parameter.
timeFormat
string
Process value using specified format. This is available only when time_type is string
timeKey
string
Specify time field for event time. If the event doesn't have this field, current time is used.
timeZone
string
Use specified timezone. one can parse/format the time value in the specified timezone.
grokFailureKey
string
The key has grok failure reason.
grokPattern
string
The pattern of grok.
grokPatternSeries
string
Specify grok pattern series set.
id
string
The @id parameter specifies a unique name for the configuration.
keepTimeKey
boolean
If true, keep time field in th record.
localtime
boolean
If true, uses local time.
logLevel
string
The @log_level parameter specifies the plugin-specific logging level
multiLineStartRegexp
string
The regexp to match beginning of multiline. This is only for "multiline_grok".
timeFormat
string
Process value according to the specified format. This is available only when time_type is string
timeFormatFallbacks
string
Uses the specified time format as a fallback in the specified order. You can parse undetermined time format by using time_format_fallbacks. This options is enabled when time_type is mixed.
timeKey
string
Specify time field for event time. If the event doesn't have this field, current time is used.
timeType
string
parses/formats value according to this type, default is string
enum:
float, unixtime, string, mixed
timeout
string
Specify timeout for parse processing.
pattern:
^\d+(\.[0-9]{0,2})?(s|m|h|d)?$
timezone
string
Uses the specified timezone.
type
string required
The @type parameter specifies the type of the plugin.
enum:
regexp, apache2, apache_error, nginx, syslog, csv, tsv, ltsv, json, multiline, none, grok, multiline_grok
types
string
Specify types for converting field into another, i.e: types user_id:integer,paid:bool,paid_usd_amount:float
utc
boolean
If true, uses UTC.
removeKeyNameField
boolean
Removes key_name field when parsing is succeeded.
replaceInvalidSequence
boolean
If true, invalid string is replaced with safe characters and re-parse it.
reserveData
boolean
Keeps the original key-value pair in the parsed result. Default is false.
i.e: If set keyName to log, reverseData to true,
{"key":"value","log":"{\"user\":1,\"num\":2}"} => {"key":"value","log":"{\"user\":1,\"num\":2}","user":1,"num":2}
reserveTime
boolean
Keeps the original event time in the parsed result. Default is false.
recordTransformer object
The filter_record_transformer filter plugin
autoTypecast
boolean
Automatically casts the field types. Default is false.
This option is effective only for field values comprised of a single placeholder.
enableRuby
boolean
When set to true, the full Ruby syntax is enabled in the ${...} expression. The default value is false.
i.e: jsonized_record ${record.to_json}
keepKeys
string
A list of keys to keep. Only relevant if renew_record is set to true.
records []object
key
string required
New field can be defined as key
value
string required
The value must from Record properties.
See https://docs.fluentd.org/filter/record_transformer#less-than-record-greater-than-directive
removeKeys
string
A list of keys to delete. Supports nested field via record_accessor syntax since v1.1.0.
renewRecord
boolean
By default, the record transformer filter mutates the incoming data. However, if this parameter is set to true, it modifies a new empty hash instead.
renewTimeKey
string
renew_time_key foo overwrites the time of events with a value of the record field foo if exists. The value of foo must be a Unix timestamp.
stdout object
The filter_stdout filter plugin
format object
The format section
delimiter
string
Delimiter for each field.
id
string
The @id parameter specifies a unique name for the configuration.
localtime
boolean
If true, uses local time.
logLevel
string
The @log_level parameter specifies the plugin-specific logging level
newline
string
Specify newline characters.
enum:
lf, crlf
outputTag
boolean
Output tag field if true.
outputTime
boolean
Output time field if true.
timeFormat
string
Process value according to the specified format. This is available only when time_type is string
timeFormatFallbacks
string
Uses the specified time format as a fallback in the specified order. You can parse undetermined time format by using time_format_fallbacks. This options is enabled when time_type is mixed.
timeType
string
parses/formats value according to this type, default is string
enum:
float, unixtime, string, mixed
timezone
string
Uses the specified timezone.
type
string
The @type parameter specifies the type of the plugin.
enum:
out_file, json, ltsv, csv, msgpack, hash, single_value
utc
boolean
If true, uses UTC.
inject object
The inject section
hostname
string
Hostname value
hostnameKey
string
The field name to inject hostname
inline object
Time section
localtime
boolean
If true, uses local time.
timeFormat
string
Process value according to the specified format. This is available only when time_type is string
timeFormatFallbacks
string
Uses the specified time format as a fallback in the specified order. You can parse undetermined time format by using time_format_fallbacks. This options is enabled when time_type is mixed.
timeType
string
parses/formats value according to this type, default is string
enum:
float, unixtime, string, mixed
timezone
string
Uses the specified timezone.
utc
boolean
If true, uses UTC.
tagKey
string
The field name to inject tag
timeKey
string
The field name to inject time
workerIdKey
string
The field name to inject worker_id
tag
string
Which tag to be matched.
status
object
FilterStatus defines the observed state of Filter
No matches. Try .spec.filters for an exact path