Documentation
¶
Index ¶
- type Auth
- type Buffer
- type BufferCommon
- type BufferSection
- type Client
- type CommonFields
- type FileBuffer
- type FileServiceDiscovery
- type FileSingleBuffer
- type Format
- type FormatCommon
- type Inject
- type Parse
- type ParseCommon
- type SDCommon
- type Security
- type Server
- type ServiceDiscovery
- type SrvServiceDiscovery
- type Time
- type Transport
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Auth ¶
type Auth struct {
// The method for HTTP authentication. Now only basic.
// +kubebuilder:validation:Enum:basic
Method *string `json:"auth,omitempty"`
// The username for basic authentication.
Username *plugins.Secret `json:"username,omitempty"`
// The password for basic authentication.
Password *plugins.Secret `json:"password,omitempty"`
}
Auth defines the common parameters for the auth plugin
func (*Auth) Params ¶
func (a *Auth) Params(loader plugins.SecretLoader) (*params.PluginStore, error)
type Buffer ¶
type Buffer struct {
BufferCommon `json:",inline,omitempty"`
// The file buffer plugin
*FileBuffer `json:",inline,omitempty"`
// The file_single buffer plugin
*FileSingleBuffer `json:",inline,omitempty"`
// The time section of buffer plugin
Time *Time `json:",inline,omitempty"`
// Output plugin will flush chunks per specified time (enabled when time is specified in chunk keys)
TimeKey *string `json:"timekey,omitempty"`
// Output plugin will write chunks after timekey_wait seconds later after timekey expiration
TimeKeyWait *string `json:"timekeyWait,omitempty"`
// The path where buffer chunks are stored. This field would make no effect in memory buffer plugin.
// +kubebuilder:validation:Required
Path *string `json:"path"`
// The output plugins group events into chunks.
// Chunk keys, specified as the argument of <buffer> section, control how to group events into chunks.
// If tag is empty, which means blank Chunk Keys.
// Tag also supports Nested Field, combination of Chunk Keys, placeholders, etc.
// See https://docs.fluentd.org/configuration/buffer-section.
Tag string `json:"tag,omitempty"`
// Buffer parameters
// The max size of each chunks: events will be written into chunks until the size of chunks become this size
// Default: 8MB (memory) / 256MB (file)
// +kubebuilder:validation:Pattern:="^\\d+(KB|MB|GB|TB)$"
ChunkLimitSize *string `json:"chunkLimitSize,omitempty"`
// The max number of events that each chunks can store in it.
// +kubebuilder:validation:Pattern:="^\\d+(KB|MB|GB|TB)$"
ChunkLimitRecords *string `json:"chunkLimitRecords,omitempty"`
// The size limitation of this buffer plugin instance
// Default: 512MB (memory) / 64GB (file)
// +kubebuilder:validation:Pattern:="^\\d+(KB|MB|GB|TB)$"
TotalLimitSize *string `json:"totalLimitSize,omitempty"`
// The queue length limitation of this buffer plugin instance. Default: 0.95
// +kubebuilder:validation:Pattern:="^\\d+.?\\d+$"
QueueLimitLength *string `json:"queueLimitLength,omitempty"`
// Limit the number of queued chunks. Default: 1
// If a smaller flush_interval is set, e.g. 1s,
// there are lots of small queued chunks in the buffer.
// With file buffer, it may consume a lot of fd resources when output destination has a problem.
// This parameter mitigates such situations.
// +kubebuilder:validation:Minimum:=1
QueuedChunksLimitSize *int16 `json:"queuedChunksLimitSize,omitempty"`
// Fluentd will decompress these compressed chunks automatically before passing them to the output plugin
// If gzip is set, Fluentd compresses data records before writing to buffer chunks.
// Default:text.
// +kubebuilder:validation:Enum:=text;gzip
Compress *string `json:"compress,omitempty"`
// Flush parameters
// This specifies whether to flush/write all buffer chunks on shutdown or not.
FlushAtShutdown *bool `json:"flushAtShutdown,omitempty"`
// FlushMode defines the flush mode:
// lazy: flushes/writes chunks once per timekey
// interval: flushes/writes chunks per specified time via flush_interval
// immediate: flushes/writes chunks immediately after events are appended into chunks
// default: equals to lazy if time is specified as chunk key, interval otherwise
// +kubebuilder:validation:Enum:=default;lazy;interval;immediate
FlushMode *string `json:"flushMode,omitempty"`
// FlushInterval defines the flush interval
// +kubebuilder:validation:Pattern:="^\\d+(\\.[0-9]{0,2})?(s|m|h|d)?$"
FlushInterval *string `json:"flushInterval,omitempty"`
// The sleep interval (seconds) for threads to wait for the next flush try(when no chunks are waiting)
// +kubebuilder:validation:Pattern:="^\\d+$"
FlushThreadCount *string `json:"flushThreadCount,omitempty"`
// The timeout (seconds) until output plugin decides if the async write operation has failed. Default is 60s
// +kubebuilder:validation:Pattern:="^\\d+(\\.[0-9]{0,2})?(s|m|h|d)?$"
DelayedCommitTimeout *string `json:"delayedCommitTimeout,omitempty"`
// OverflowAtction defines the output plugin behave when its buffer queue is full.
// +kubebuilder:validation:Enum:throw_exception,block,drop_oldest_chunk
// Default: throw_exception
OverflowAction *string `json:"overflowAction,omitempty"`
// Retry parameters
// The maximum time (seconds) to retry to flush again the failed chunks, until the plugin discards the buffer chunks
// +kubebuilder:validation:Pattern:="^\\d+(\\.[0-9]{0,2})?(s|m|h|d)?$"
RetryTimeout *string `json:"retryTimeout,omitempty"`
// If true, plugin will ignore retry_timeout and retry_max_times options and retry flushing forever.
RetryForever *bool `json:"retryForever,omitempty"`
// The maximum number of times to retry to flush the failed chunks. Default: none
RetryMaxTimes *int16 `json:"retryMaxTimes,omitempty"`
// The ratio of retry_timeout to switch to use the secondary while failing.
// +kubebuilder:validation:Pattern:="^\\d+.?\\d+$"
RetrySecondaryThreshold *string `json:"retrySecondaryThreshold,omitempty"`
// Output plugin will retry periodically with fixed intervals.
// +kubebuilder:validation:Enum:exponential_backoff,periodic
RetryType *string `json:"retryType,omitempty"`
// Wait in seconds before the next retry to flush or constant factor of exponential backoff
// +kubebuilder:validation:Pattern:="^\\d+(\\.[0-9]{0,2})?(s|m|h|d)?$"
RetryWait *string `json:"retryWait,omitempty"`
// The base number of exponential backoff for retries.
// +kubebuilder:validation:Pattern:="^\\d+(\\.[0-9]{0,2})?$"
RetryExponentialBackoffBase *string `json:"retryExponentialBackoffBase,omitempty"`
// The maximum interval (seconds) for exponential backoff between retries while failing
// +kubebuilder:validation:Pattern:="^\\d+(\\.[0-9]{0,2})?(s|m|h|d)?$"
RetryMaxInterval *string `json:"retryMaxInterval,omitempty"`
// If true, the output plugin will retry after randomized interval not to do burst retries
RetryRandomize *bool `json:"retryRandomize,omitempty"`
// Instead of storing unrecoverable chunks in the backup directory, just discard them. This option is new in Fluentd v1.2.6.
DisableChunkBackup *bool `json:"disableChunkBackup,omitempty"`
}
Buffer defines various parameters for the buffer Plugin
func (*Buffer) Params ¶
func (b *Buffer) Params(_ plugins.SecretLoader) (*params.PluginStore, error)
type BufferCommon ¶
type BufferCommon struct {
// The @id parameter specifies a unique name for the configuration.
Id *string `json:"id,omitempty"`
// The @type parameter specifies the type of the plugin.
// +kubebuilder:validation:Enum:=file;memory;file_single
// +kubebuilder:validation:Required
Type *string `json:"type"`
// The @log_level parameter specifies the plugin-specific logging level
LogLevel *string `json:"logLevel,omitempty"`
}
+kubebuilder:object:generate:=true BufferCommon defines common parameters for the buffer plugin
func (*BufferCommon) DeepCopy ¶
func (in *BufferCommon) DeepCopy() *BufferCommon
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BufferCommon.
func (*BufferCommon) DeepCopyInto ¶
func (in *BufferCommon) DeepCopyInto(out *BufferCommon)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BufferSection ¶
type BufferSection struct {
// buffer section
Buffer *Buffer `json:"buffer,omitempty"`
// format section
Format *Format `json:"format,omitempty"`
// inject section
Inject *Inject `json:"inject,omitempty"`
}
BufferSection defines the common parameters for buffer sections
type Client ¶
type Client struct {
// The IP address or hostname of the client. This is exclusive with Network.
Host *string `json:"host,omitempty"`
// The network address specification. This is exclusive with Host.
Network *string `json:"network,omitempty"`
SharedKey *string `json:"sharedKey,omitempty"`
// The array of usernames.
Users *string `json:"users,omitempty"`
}
Client defines the commont parameters for the client plugin
func (*Client) Params ¶
func (c *Client) Params(_ plugins.SecretLoader) (*params.PluginStore, error)
type CommonFields ¶
type CommonFields struct {
// The @id parameter specifies a unique name for the configuration.
Id *string `json:"id,omitempty"`
// The @type parameter specifies the type of the plugin.
Type *string `json:"type,omitempty"`
// The @log_level parameter specifies the plugin-specific logging level
LogLevel *string `json:"logLevel,omitempty"`
}
+kubebuilder:object:generate:=true CommonFields defines the common parameters for all plugins
func (*CommonFields) DeepCopy ¶
func (in *CommonFields) DeepCopy() *CommonFields
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CommonFields.
func (*CommonFields) DeepCopyInto ¶
func (in *CommonFields) DeepCopyInto(out *CommonFields)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FileBuffer ¶
type FileBuffer struct {
// Changes the suffix of the buffer file.
PathSuffix *string `json:"pathSuffix,omitempty"`
}
The file buffer plugin provides a persistent buffer implementation. It uses files to store buffer chunks on disk.
type FileServiceDiscovery ¶
type FileServiceDiscovery struct {
// The path of the target list. Default is '/etc/fluent/sd.yaml'
Path *string `json:"path,omitempty"`
// The encoding of the configuration file.
ConfEncoding *string `json:"confEncoding,omitempty"`
}
FileServiceDiscovery defines the file type for the ServiceDiscovery plugin
type FileSingleBuffer ¶
type FileSingleBuffer struct {
// Calculates the number of records, chunk size, during chunk resume.
CalcNumRecords *string `json:"calcNumRecords,omitempty"`
// ChunkFormat specifies the chunk format for calc_num_records.
// +kubebuilder:validation:Enum:=msgpack;text;auto
ChunkFormat *string `json:"chunkFormat,omitempty"`
}
The file_single buffer plugin is similar to file_file but it does not have the metadata file. See https://docs.fluentd.org/buffer/file_single#limitation
type Format ¶
type Format struct {
FormatCommon `json:",inline,omitempty"`
// Time defines time parameters for Format Plugins
Time `json:",inline,omitempty"`
// Delimiter for each field.
Delimiter *string `json:"delimiter,omitempty"`
// Output tag field if true.
OutputTag *bool `json:"outputTag,omitempty"`
// Output time field if true.
OutputTime *bool `json:"outputTime,omitempty"`
// Overwrites the default value in this plugin.
TimeType *string `json:"timeType,omitempty"`
// Overwrites the default value in this plugin.
TimeFormat *string `json:"timeFormat,omitempty"`
// Specify newline characters.
// +kubebuilder:validation:Enum:=lf;crlf
Newline *string `json:"newline,omitempty"`
}
Format defines various parameters of the format plugin
func (*Format) Params ¶
func (f *Format) Params(_ plugins.SecretLoader) (*params.PluginStore, error)
type FormatCommon ¶
type FormatCommon struct {
// The @id parameter specifies a unique name for the configuration.
Id *string `json:"id,omitempty"`
// The @type parameter specifies the type of the plugin.
// +kubebuilder:validation:Enum:=out_file;json;ltsv;csv;msgpack;hash;single_value
Type *string `json:"type,omitempty"`
// The @log_level parameter specifies the plugin-specific logging level
LogLevel *string `json:"logLevel,omitempty"`
}
FormatCommon defines common parameters of the format plugin
type Inject ¶
type Inject struct {
// Time section
Time `json:"inline,omitempty"`
// The field name to inject hostname
HostnameKey *string `json:"hostnameKey,omitempty"`
// Hostname value
Hostname *string `json:"hostname,omitempty"`
// The field name to inject worker_id
WorkerIdKey *string `json:"workerIdKey,omitempty"`
// The field name to inject tag
TagKey *string `json:"tagKey,omitempty"`
// The field name to inject time
TimeKey *string `json:"timeKey,omitempty"`
}
Inject defines the common parameters for the inject plugin The inject section can be under <match> or <filter> section.
func (*Inject) Params ¶
func (j *Inject) Params(_ plugins.SecretLoader) (*params.PluginStore, error)
type Parse ¶
type Parse struct {
ParseCommon `json:",inline"`
Time `json:",inline,omitempty"`
// Specifies the regular expression for matching logs. Regular expression also supports i and m suffix.
Expression *string `json:"expression,omitempty"`
// Specify types for converting field into another, i.e: types user_id:integer,paid:bool,paid_usd_amount:float
Types *string `json:"types,omitempty"`
// Specify time field for event time. If the event doesn't have this field, current time is used.
TimeKey *string `json:"timeKey,omitempty"`
// If true, use Fluent::Eventnow(current time) as a timestamp when time_key is specified.
EstimateCurentEvent *bool `json:"estimateCurrentEvent,omitempty"`
// If true, keep time field in th record.
KeepTimeKey *bool `json:"keepTimeKey,omitempty"`
// Specify timeout for parse processing.
// +kubebuilder:validation:Pattern:="^\\d+(\\.[0-9]{0,2})?(s|m|h|d)?$"
Timeout *string `json:"timeout,omitempty"`
}
Parse defines various parameters for the parse plugin
func (*Parse) Params ¶
func (p *Parse) Params(_ plugins.SecretLoader) (*params.PluginStore, error)
type ParseCommon ¶
type ParseCommon struct {
// The @id parameter specifies a unique name for the configuration.
Id *string `json:"id,omitempty"`
// The @type parameter specifies the type of the plugin.
// +kubebuilder:validation:Enum:=regexp;apache2;apache_error;nginx;syslog;csv;tsv;ltsv;json;multiline;none
Type *string `json:"type"`
// The @log_level parameter specifies the plugin-specific logging level
LogLevel *string `json:"logLevel,omitempty"`
}
ParseCommon defines the common parameters for the parse plugin
type SDCommon ¶
type SDCommon struct {
// The @id parameter specifies a unique name for the configuration.
Id *string `json:"id,omitempty"`
// The @type parameter specifies the type of the plugin.
// +kubebuilder:validation:Enum:=static;file;srv
Type *string `json:"type"`
// The @log_level parameter specifies the plugin-specific logging level
LogLevel *string `json:"logLevel,omitempty"`
}
SDCommon defines the common parameters for the ServiceDiscovery plugin
type Security ¶
type Security struct {
// The hostname.
SelfHostname *string `json:"selfHostname,omitempty"`
SharedKey *string `json:"sharedKey,omitempty"`
// If true, user-based authentication is used.
UserAuth *string `json:"userAuth,omitempty"`
// Allows the anonymous source. <client> sections are required, if disabled.
AllowAnonymousSource *string `json:"allowAnonymousSource,omitempty"`
// Defines user section directly.
*User `json:"user,omitempty"`
}
Security defines the common parameters for the security plugin
func (*Security) Params ¶
func (s *Security) Params(loader plugins.SecretLoader) (*params.PluginStore, error)
type Server ¶
type Server struct {
CommonFields `json:",inline"`
// Host defines the IP address or host name of the server.
Host *string `json:"host,omitempty"`
// Name defines the name of the server. Used for logging and certificate verification in TLS transport (when the host is the address).
ServerName *string `json:"name,omitempty"`
// Port defines the port number of the host. Note that both TCP packets (event stream) and UDP packets (heartbeat messages) are sent to this port.
Port *string `json:"port,omitempty"`
SharedKey *string `json:"sharedKey,omitempty"`
// Username defines the username for authentication.
Username *plugins.Secret `json:"username,omitempty"`
// Password defines the password for authentication.
Password *plugins.Secret `json:"password,omitempty"`
// Standby marks a node as the standby node for an Active-Standby model between Fluentd nodes.
Standby *string `json:"standby,omitempty"`
// Weight defines the load balancing weight
Weight *string `json:"weight,omitempty"`
}
Server defines the common parameters for the server plugin
func (*Server) Params ¶
func (s *Server) Params(loader plugins.SecretLoader) (*params.PluginStore, error)
type ServiceDiscovery ¶
type ServiceDiscovery struct {
SDCommon `json:",inline,omitempty"`
// The server section of this plugin
Server *Server `json:"server,omitempty"`
*FileServiceDiscovery `json:",inline,omitempty"`
*SrvServiceDiscovery `json:",inline,omitempty"`
}
ServiceDiscovery defines various parameters for the ServiceDiscovery plugin. Fluentd has a pluggable system called Service Discovery that lets the user extend and reuse custom output service discovery.
func (*ServiceDiscovery) Name ¶
func (sd *ServiceDiscovery) Name() string
func (*ServiceDiscovery) Params ¶
func (sd *ServiceDiscovery) Params(loader plugins.SecretLoader) (*params.PluginStore, error)
type SrvServiceDiscovery ¶
type SrvServiceDiscovery struct {
// Service without the underscore in RFC2782.
Service *string `json:"service,omitempty"`
// Proto without the underscore in RFC2782.
Proto *string `json:"proto,omitempty"`
// The name in RFC2782.
Hostname *string `json:"hostname,omitempty"`
// DnsServerHost defines the hostname of the DNS server to request the SRV record.
DnsServerHost *string `json:"dnsServerHost,omitempty"`
// Interval defines the interval of sending requests to DNS server.
Interval *string `json:"interval,omitempty"`
// DnsLookup resolves the hostname to IP address of the SRV's Target.
DnsLookup *string `json:"dnsLookup,omitempty"`
}
SrvServiceDiscovery defines the srv type for the ServiceDiscovery plugin
type Time ¶
type Time struct {
// parses/formats value according to this type, default is *string
// +kubebuilder:validation:Enum:=float;unixtime;*string;mixed
TimeType *string `json:"timeType,omitempty"`
// Process value according to the specified format. This is available only when time_type is *string
TimeFormat *string `json:"timeFormat,omitempty"`
// If true, uses local time.
Localtime *bool `json:"localtime,omitempty"`
// If true, uses UTC.
UTC *bool `json:"utc,omitempty"`
// Uses the specified timezone.
Timezone *string `json:"timezone,omitempty"`
// 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.
TimeFormatFallbacks *string `json:"timeFormatFallbacks,omitempty"`
}
Time defines the common parameters for the time plugin
type Transport ¶
type Transport struct {
// The protocal name of this plugin, i.e: tls
Protocol *string `json:"protocol,omitempty"`
Version *string `json:"version,omitempty"`
Ciphers *string `json:"ciphers,omitempty"`
Insecure *bool `json:"insecure,omitempty"`
// for Cert signed by public CA
CaPath *string `json:"caPath,omitempty"`
CertPath *string `json:"certPath,omitempty"`
PrivateKeyPath *string `json:"privateKeyPath,omitempty"`
PrivateKeyPassphrase *string `json:"privateKeyPassphrase,omitempty"`
ClientCertAuth *bool `json:"clientCertAuth,omitempty"`
// for Cert generated
CaCertPath *string `json:"caCertPath,omitempty"`
CaPrivateKeyPath *string `json:"caPrivateKeyPath,omitempty"`
CaPrivateKeyPassphrase *string `json:"caPrivateKeyPassphrase,omitempty"`
// other parameters
CertVerifier *string `json:"certVerifier,omitempty"`
}
Transport defines the commont parameters for the transport plugin
func (*Transport) Params ¶
func (t *Transport) Params(_ plugins.SecretLoader) (*params.PluginStore, error)