Classes
fluentbit
: Installs and configures fluentbitfluentbit::config
: configures the main fluentbit main configfluentbit::install
: Installs fluentbit packagefluentbit::repo
: configures the fluentbit repofluentbit::repo::debian
: A short summary of the purpose of this classfluentbit::service
: Manages the td-agent-bit service
Defined types
fluentbit::filter::modify
: Filter to modify records using rules and conditionsfluentbit::input::forward
: Inputs / listen and forward messagesfluentbit::input::syslog
: Ingest logs from (r)syslogfluentbit::input::tail
: Input plugin to monitor one or several text files.fluentbit::output::es
: Plugin to output logs to a configured elasticsearch instancefluentbit::output::http
: Manage the configuration of a HTTP output plugin.
Installs and configures fluentbit
- See also https://docs.fluentbit.io/manual/
include fluentbit
The following parameters are available in the fluentbit
class.
Data type: Boolean
Installs the package repositories
Data type: String[1]
the td-agent-bit service name
Data type: Array[Fluentbit::Plugin]
Hash of the INPUT plugins to be configured
Data type: Array[Fluentbit::Plugin]
Hash of the OUTPUT plugins to be configured
Data type: Array[Fluentbit::Plugin]
Hash of the filter to be configured
Installs the package repositories
Data type: String[1]
GPG key identifier of the repository
Data type: Stdlib::HTTPUrl
GPG key location
Data type: String[1]
Whether to install the Fluentbit package, and what version to install. Values: 'present', 'latest', or a specific version number. Default value: 'present'.
Data type: String[1]
Specifies the Fluentbit package to manage. Default value: 'td-agent-bit'
Data type: Boolean
Whether to manage the service at all. Default value: true
Data type: Boolean
Whether to enable the fluentbit service at boot. Default value: true.
Data type: Stdlib::Ensure::Service
Whether the fluentbit service should be running. Default value: 'running'.
Whether to manage the fluentbit service. Default value: true.
Whether the service has a functional status command. Default value: true.
Whether the service has a restart command. Default value: true.
Data type: Boolean
Whether to manage the configuration directory. When enabled, will remove all unmanaged files from the directory the configuration resides in. Default value: true
Data type: Stdlib::Absolutepath
Path of the daemon configuration.
Data type: Stdlib::Filemode
File mode to apply to the daemon configuration file
Data type: Optional[Stdlib::Absolutepath]
Set an optional location in the file system to store streams and chunks of data. If this parameter is not set, Input plugins can only use in-memory buffering.
Data type: Optional[Enum['normal', 'full']]
Configure the synchronization mode used to store the data into the file system. It can take the values normal or full. Default value: 'normal'
Data type: Boolean
Enable the data integrity check when writing and reading data from the filesystem. The storage layer uses the CRC32 algorithm. Default value: false
Data type: Optional[String[1]]
If storage.path is set, Fluent Bit will look for data chunks that were not delivered and are still in the storage layer, these are called backlog data. This option configure a hint of maximum value of memory to use when processing these records. Default value: 5M
Data type: Boolean
Whether to manage the enabled external plugins
Data type: Stdlib::Absolutepath
A plugins configuration file allows to define paths for external plugins.
Data type: Array[Stdlib::Absolutepath]
List of external plugin objects to enable
Data type: Boolean
Whether to manage the stream processing configuration
Data type: Stdlib::Absolutepath
Path for the Stream Processor configuration file.
Data type: Array[Fluentbit::Stream]
Stream processing tasks
Data type: Boolean
Whether to manage the parser definitions
Data type: Stdlib::Absolutepath
Path for a parsers configuration file. Multiple Parsers_File entries can be used.
Data type: Array[Fluentbit::Parser]
List of parser definitions. The default value consists of all the available definitions provided by the upstream project as of version 1.3
Data type: Integer
Set the flush time in seconds. Everytime it timeouts, the engine will flush the records to the output plugin.
Data type: Boolean
Boolean value to set if Fluent Bit should run as a Daemon (background) or not. Allowed values are: yes, no, on and off.
Data type: Optional[Stdlib::Absolutepath]
Absolute path for an optional log file.
Data type: Enum['error', 'warning', 'info', 'debug', 'trace']
Set the logging verbosity level. Values are: error, info, debug and trace. Values are accumulative, e.g: if 'debug' is set, it will include error, info and debug. Note that trace mode is only available if Fluent Bit was built with the WITH_TRACE option enabled.
Data type: Boolean
Enable built-in HTTP Server
Data type: Stdlib::IP::Address::Nosubnet
Set listening interface for HTTP Server when it's enabled
Data type: Stdlib::Port
Set TCP Port for the HTTP Server
Data type: Integer
Set the coroutines stack size in bytes. The value must be greater than the page size of the running system.
Data type: Hash
macro definitions to use in the configuration file the will be registered using the @SET command.
Data type: Boolean
Data type: Boolean
Includes all [input] and [output] configs. (@include) Sets global variables (@set) Configures global [service] section
Installs fluentbit package
configures the fluentbit repo
A description of what this class does
include fluentbit::repo::debian
Manages the td-agent-bit service
Filter to modify records using rules and conditions
fluentbit::filter::modify { 'namevar': }
The following parameters are available in the fluentbit::filter::modify
defined type.
Data type: String
Path to the filter configfile. Naming should be filter_*.conf to make sure it's getting included by the main config.
Default value: '/etc/td-agent-bit/filter_modify.conf'
Data type: Optional
Add a key/value pair with key KEY and value VALUE. If KEY already exists, this field is overwritten
Default value: undef
Data type: Optional
Add a key/value pair with key KEY and value VALUE if KEY does not exist
Default value: undef
Data type: Optional
Remove a key/value pair with key KEY if it exists
Default value: undef
Data type: Optional
Remove all key/value pairs with key matching wildcard KEY
Default value: undef
Data type: Optional
Remove all key/value pairs with key matching regexp KEY
Default value: undef
Data type: Optional
Rename a key/value pair with key KEY to RENAMED_KEY if KEY exists AND RENAMED_KEY does not exist
Default value: undef
Data type: Optional
Rename a key/value pair with key KEY to RENAMED_KEY if KEY exists. If RENAMED_KEY already exists, this field is overwritten
Default value: undef
Data type: Optional
Copy a key/value pair with key KEY to COPIED_KEY if KEY exists AND COPIED_KEY does not exist
Default value: undef
Data type: Optional
Copy a key/value pair with key KEY to COPIED_KEY if KEY exists. If COPIED_KEY already exists, this field is overwritten
Default value: undef
Data type: String
Default value: '*'
Forward is the protocol used by Fluent Bit and Fluentd to route messages between peers. This plugin implements the input service to listen for Forward messages.
The following parameters are available in the fluentbit::input::forward
defined type.
Data type: String
Path to the input configfile. Naming should be input_*.conf to make sure it's getting included by the main config.
Default value: "/etc/td-agent-bit/input_forward_${name}.conf"
Data type: Stdlib::IP::Address::Nosubnet
Listener network interface
Default value: '0.0.0.0'
Data type: Stdlib::Port
TCP port to listen for incoming connections.
Default value: 24224
Data type: Optional[String]
Specify the maximum buffer memory size used to receive a Forward message. The value must be according to the Unit Size specification.
Default value: undef
Data type: Optional[String]
By default the buffer to store the incoming Forward messages, do not allocate the maximum memory allowed, instead it allocate memory when is required. The rounds of allocations are set by Buffer_Chunk_Size. The value must be according to the Unit Size specification.
Default value: undef
Setups config file for fluentbit and configures listen on rsyslog. Reloads services if something changes.
The following parameters are available in the fluentbit::input::syslog
defined type.
Data type: String
Defines transport protocol mode: unix_udp (UDP over Unix socket), unix_tcp (TCP over Unix socket), tcp or udp
Default value: 'unix_udp'
Data type: Optional[String]
If Mode is set to tcp, specify the network interface to bind.
Default value: $mode
Data type: Optional[String]
If Mode is set to tcp, specify the TCP port to listen for incoming connections.
Default value: $mode
Data type: Optional[String]
If Mode is set to unix_tcp or unix_udp, set the absolute path to the Unix socket file.
Default value: $mode
Data type: String
Specify an alternative parser for the message. By default, the plugin uses the parser syslog-rfc3164. If your syslog messages have fractional seconds set this Parser value to syslog-rfc5424 instead.
Default value: 'syslog-rfc3164'
Data type: String
Specify the path to the rsyslog config file for fluentbit to enable listening.
Default value: '/etc/rsyslog.d/60-fluent-bit.conf'
Data type: String
Path to the input configfile. Naming should be input_*.conf to make sure it's getting included by the main config.
Default value: '/etc/td-agent-bit/input_syslog.conf'
The tail input plugin allows to monitor one or several text files.
It has a similar behavior like tail -f
shell command.
The following parameters are available in the fluentbit::input::tail
defined type.
Data type: Stdlib::Absolutepath
Path to the input configfile. Naming should be input_*.conf to make sure it's getting included by the main config.
Default value: "/etc/td-agent-bit/input_tail_${name}.conf"
Data type: Stdlib::Absolutepath
Pattern specifying a specific log files or multiple ones through the use of common wildcards.
Data type: Optional[String[1]]
Set a tag (with regex-extract fields) that will be placed on lines read.
Default value: undef
Data type: Optional[Enum['memory', 'filesystem']]
Specify the buffering mechanism to use. Values: memory, filesystem
Default value: undef
Data type: Optional[Fluentbit::Sizeunit]
Set the initial buffer size to read files data.
Default value: undef
Data type: Optional[Fluentbit::Sizeunit]
Set the limit of the buffer size per monitored file.
Default value: undef
Data type: Optional[String[1]]
Appends the name of the monitored file as part of the record. The value assigned becomes the key in the map.
Default value: undef
Data type: Array[String]
Shell patterns to exclude files matching a certain criteria.
Default value: []
Data type: Optional[Integer[1]]
The interval of refreshing the list of watched files in seconds.
Default value: undef
Data type: Optional[Integer[1]]
Specify the number of extra time in seconds to monitor a file once is rotated in case some pending data is flushed.
Default value: undef
Data type: Optional[Fluentbit::Timeunit]
Ignores files that have been last modified before this time.
Default value: undef
Data type: Boolean
When a monitored file reach it buffer capacity due to a very long line (Buffer_Max_Size), the default behavior is to stop monitoring that file. Skip_Long_Lines alters that behavior and instructs Fluent Bit to skip long lines and continue processing other lines that fits into the buffer size.
Default value: false
Data type: Optional[Stdlib::Absolutepath]
Specify the database file to keep track of monitored files and offsets.
Default value: undef
Data type: Optional[Enum['Extra', 'Full', 'Normal', 'Off']]
Set a default synchronization (I/O) method. Values: Extra, Full, Normal, Off.
Default value: undef
Data type: Optional[Fluentbit::Sizeunit]
Set a limit of memory that Tail plugin can use when appending data to the Engine.
Default value: undef
Data type: Optional[String[1]]
Name of the key to append any unstructured data to the output as.
Default value: undef
Data type: Optional[String[1]]
Set a regex to exctract fields from the file.
Default value: undef
Data type: Boolean
Try to discover multiline messages and use the proper parsers to compose the outgoing messages.
Default value: false
Data type: Optional[Integer[1]]
Wait period time in seconds to process queued multiline messages.
Default value: undef
Data type: Array[String[1]]
Name of parsers to use for disecting the message. When multiline is enabled, the first array entry becomes the configuration value for Parser_Firstline, with the remaining entry being assigned to the Parser_N attributes. When multiline is disabled, only the first item is used for the Parser configuration value.
Default value: []
Data type: Boolean
Recombine split Docker log lines before passing them to any parser.
Default value: false
Data type: Optional[Integer[1]]
Wait period time in seconds to flush queued unfinished split lines.
Default value: undef
Data type: Boolean
For new discovered files on start (without a database offset/position), read the content from the head of the file, not tail.
Default value: false
Plugin to output logs to a configured elasticsearch instance
include fluentbit::output::es
The following parameters are available in the fluentbit::output::es
defined type.
Data type: String
Path to the output configfile. Naming should be output_*.conf to make sure it's getting included by the main config.
Default value: "/etc/td-agent-bit/output_es_${name}.conf"
Data type: String
Tag to route the output.
Default value: '*'
Data type: Enum['on', 'off']
Turn TLS encrypted communication with Elasticsearch on / off.
Default value: 'off'
Data type: Stdlib::Host
IP address or hostname of the target Elasticsearch instance
Default value: '127.0.0.1'
Data type: Stdlib::Port
TCP port of the target Elasticsearch instance
Default value: 9200
Elasticsearch accepts new data on HTTP query path "/_bulk". But it is also possible to serve Elasticsearch behind a reverse proxy on a subpath. This option defines such path on the fluent-bit side. It simply adds a path prefix in the indexing HTTP POST URI.
Specify the buffer size used to read the response from the Elasticsearch HTTP service. This option is useful for debugging purposes where is required to read full responses, note that response size grows depending of the number of records inserted. To set an unlimited amount of memory set this value to False, otherwise the value must be according to the Unit Size specification.
Newer versions of Elasticsearch allows to setup filters called pipelines. This option allows to define which pipeline the database should use. For performance reasons is strongly suggested to do parsing and filtering on Fluent Bit side, avoid pipelines.
Data type: Optional[String]
Optional username credential for Elastic X-Pack access
Default value: undef
Data type: Optional[String]
Password for user defined in HTTP_User
Default value: undef
Data type: String
Index name
Default value: 'fluentbit'
Data type: String
Type name
Default value: 'flb_type'
Enable Logstash format compatibility.
When Logstash_Format is enabled, the Index name is composed using a prefix and the date, e.g: If Logstash_Prefix is equals to 'mydata' your index will become 'mydata-YYYY.MM.DD'. The last string appended belongs to the date when the data is being generated.
Time format (based on strftime) to generate the second part of the Index name.
When Logstash_Format is enabled, each record will get a new timestamp field. The Time_Key property defines the name of that field.
When Logstash_Format is enabled, this property defines the format of the timestamp.
When enabled, it append the Tag name to the record.
When Include_Tag_Key is enabled, this property defines the key name for the tag.
When enabled, generate _id for outgoing records. This prevents duplicate records when retrying ES.
When enabled, replace field name dots with underscore, required by Elasticsearch 2.0-2.3.
When enabled print the elasticsearch API calls to stdout (for diag only)
Use current time for index generation instead of message record
Prefix keys with this string
The http output plugin allows to flush your records into a HTTP endpoint. This type manages the configuration for it.
fluentbit::output::http { 'logstash': }
The following parameters are available in the fluentbit::output::http
defined type.
Data type: Stdlib::Absolutepath
Path to the output configfile. Naming should be output_*.conf to make sure it's getting included by the main config.
Default value: "/etc/td-agent-bit/output_http_${name}.conf"
Data type: Optional[String[1]]
Tag to route the output.
Default value: undef
Data type: Fluentbit::TLS
TLS configuration. By default TLS is disabled.
Default value: {}
Data type: Hash[String[1], String[1]]
Map of headers to add to requests.
Default value: {}
Data type: Variant[Undef, Boolean, Integer[1]]
Number of retries if upstream refuses the records. false will disable retries, true will cause it to retry once. All other values are passed on verbatim.
Default value: undef
Data type: Optional[Stdlib::Host]
IP address or hostname of the target HTTP Server.
Default value: undef
Data type: Optional[Stdlib::Port]
TCP port of the target HTTP Server.
Default value: undef
Data type: Optional[String[1]]
Basic Auth Username.
Default value: undef
Data type: Optional[String[1]]
Basic Auth Password. Requires HTTP_User to be set.
Default value: undef
Data type: Optional[Stdlib::HTTPUrl]
Specify an HTTP Proxy.
Default value: undef
Data type: Optional[Stdlib::Absolutepath]
Specify an optional HTTP URI for the target web server.
Default value: undef
Data type: Optional[Enum['msgpack', 'json', 'json_stream', 'json_lines', 'gelf']]
Specify the data format to be used in the HTTP request body.
Default value: undef
Data type: Optional[String[1]]
Specify an optional HTTP header field for the original message tag.
Default value: undef
Data type: Optional[String[1]]
Specify the name of the date field in output.
Default value: undef
Data type: Optional[Enum['double', 'iso8601']]
Specify the format of the date.
Default value: undef
Data type: Optional[String[1]]
Specify the key to use for timestamp in gelf format.
Default value: undef
Data type: Optional[String[1]]
Specify the key to use for host in gelf format.
Default value: undef
Data type: Optional[String[1]]
Specify the key to use for short in gelf format.
Default value: undef
Data type: Optional[String[1]]
Specify the key to use for full in gelf format.
Default value: undef
Data type: Optional[String[1]]
Specify the key to use for level in gelf format.
Default value: undef