Configuration Parameter Types
Types of Configuration Parameters
Common Options
default
: Specifies the default value for a parameter. If omitted, theparameter is required. On startup, Fluentd uses the default value instead if
the parameter is not configured.
secret
: Iftrue
, the parameter will be masked when Fluentd dumps itsconfiguration on the standard output on startup.
deprecated
: Specifies the deprecation warning message. If users use thisparameter in the configuration, they will see the deprecation warning on
startup.
obsoleted
: Specifies the obsolete error message. If users use this parameterin the configuration, Fluentd raises
Fluent::ConfigError
and stops.
alias
: Alias for this parameter as a symbol.skip_accessor
: Iftrue
, skip adding accessor to the plugin. For internaluse only!
Data Types
:string
:string
Defines a string parameter.
Code Example:
Configuration Example:
:regexp
:regexp
Defines a regexp parameter. Since v1.2.0.
Code Example:
Configuration Example:
:integer
:integer
Defines an integer parameter.
Code Example:
Configuration Example:
:float
:float
Defines a float parameter.
Code Example:
Configuration Example:
:size
:size
Defines a size parameter in bytes.
Available suffixes: { k
, m
, g
, t
} (ignore case)
Code Example:
Configuration Example:
Configuration Example:
:time
:time
Defines the length of the time parameter.
Available suffixes: { s
, m
, h
, d
} (lower case only).
If omitted, to_f
is applied to the value which converts it to seconds.
Code Example:
Configuration Example:
Configuration Example:
:bool
:bool
Defines a Boolean parameter.
Code Example:
Configuration Example:
:enum
:enum
Defines an enumerated parameter.
Users can choose a value from the list. If a non-listed value is chosen, an error occurs on startup.
Available options
list
: List of available values.
Code Example:
Configuration Example:
:array
:array
Defines an array parameter.
Users can set an array value for a parameter.
Available options
value_type
: Defines the type of the value.Available types: {
:string
,:integer
,:float
,:size
,:bool
,:time
}
Code Example:
Configuration Example:
This configuration will be converted to:
:hash
:hash
Defines a hash parameter.
Available options
symbolize_keys
: Iftrue
, the keys are symbolized.value_type
: Defines the same type for all values.
Code Example:
Configuration Example:
This configurations will be converted to:
If this article is incorrect or outdated, or omits critical information, please let us know. Fluentd is an open-source project under Cloud Native Computing Foundation (CNCF). All components are available under the Apache 2 License.
Last updated