Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
// > @3@4@5@6
// >
// > Docker splits long logs by 16kb chunks. The plugin joins them back, but if an event is longer than this value in bytes, it will be split after all.
// > > Due to the optimization process it's not a strict rule. Events may be split even if they won't exceed the limit.
SplitEventSize int `json:"split_event_size" default:"1000000"` // *
// > @3@4@5@6
// >
// > How many entries for deleted pods should be stored in the cache
DeletedPodsCacheSize int `json:"deleted_pods_cache_size" default:"10000"` // *
// > @3@4@5@6
// >
// > If set, it defines which pod labels to add to the event, others will be ignored.
AllowedPodLabels []string `json:"allowed_pod_labels" slice:"true"` // *
AllowedPodLabels_ map[string]bool
// > @3@4@5@6
// >
// > If set, it defines which node labels to add to the event, others will be ignored.
AllowedNodeLabels []string `json:"allowed_node_labels" slice:"true"` // *
AllowedNodeLabels_ map[string]bool
// > @3@4@5@6
// >
// > Skips retrieving Kubernetes meta information using Kubernetes API and adds only `k8s_node` field.
OnlyNode bool `json:"only_node" default:"false"` // *
// > @3@4@5@6
// >
// > Kubernetes dir with container logs. It's like `watching_dir` parameter from [file plugin](/plugin/input/file/README.md) config.
WatchingDir string `json:"watching_dir" default:"/var/log/containers"` // *
WatchingDir_ string
// > @3@4@5@6
// >
// > The filename to store offsets of processed files. It's like `offsets_file` parameter from [file plugin](/plugin/input/file/README.md) config.
OffsetsFile string `json:"offsets_file" required:"true"` // *
// > @3@4@5@6
// >
// > Under the hood this plugin uses [file plugin](/plugin/input/file/README.md) to collect logs from files. So you can change any [file plugin](/plugin/input/file/README.md) config parameter using `file_config` section. Check out an example.
FileConfig file.Config `json:"file_config" child:"true"` // *
// > @3@4@5@6
// >
// > K8sMeta params
// >
// > Add meta information to an event (look at Meta params)
// > Use [go-template](https://pkg.go.dev/text/template) syntax
// >
// > Built-in meta params
// >
// > `k8s_pod`: `{{ .pod_name }}`
// >
// > `k8s_namespace`: `{{ .namespace_name }}`
// >
// > `k8s_container`: `{{ .container }}`
// >
// > `k8s_container_id`: `{{ .container_id }}`
// >
// > Example: “`component: '{{ index .pod.Labels "component" | default .k8s_container }}'“`
K8sMeta cfg.MetaTemplates `json:"meta"` // *
// > @3@4@5@6
// >
// > The filename to store current k8s pod metadata.
// >
// > Metadata contains:
// > * PodMeta `map[Namespace]map[PodName]map[ContainerID]*podMeta`, where `podMeta` is a wrapper for `corev1.Pod`
// > * CriType `string`
// > * NodeLabels `map[string]string`
// >
// > Metadata is saved once per gatherer `MaintenanceInterval` and is loaded only on initialization.
// >
// > If parameter is empty, the metadata won't be cached.
// >
// > > This feature is used to reuse metadata that we have already received, in particular if the kube-apiserver is unavailable.
// > >
// > > The plugin considers kube-apiserver to be unavailable from the moment the `SetWatchErrorHandler` handler is called until one of the `ResourceEventHandlerFuncs` handlers is called.
K8sMetaFile string `json:"meta_file" default:""` // *
}
type MultilineAction ¶
type MultilineAction struct {
// contains filtered or unexported fields
}
func (*MultilineAction) Do ¶
func (p *MultilineAction) Do(event *pipeline.Event) pipeline.ActionResult
func (*MultilineAction) Start ¶
func (p *MultilineAction) Start(config pipeline.AnyConfig, params *pipeline.ActionPluginParams)
func (*MultilineAction) Stop ¶
func (p *MultilineAction) Stop()
Click to show internal directories.
Click to hide internal directories.