vector

package
v1.32.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 27, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DestElasticsearch = "Elasticsearch"
	DestLogstash      = "Logstash"
	DestLoki          = "Loki"
)
View Source
const (
	SourceKubernetesPods = "KubernetesPods"
	SourceFile           = "File"
)

Variables

This section is empty.

Functions

func BuildTransformsFromMapSlice

func BuildTransformsFromMapSlice(inputName string, trans []impl.LogTransform) ([]impl.LogTransform, error)

func CreateDefaultCleanUpTransforms

func CreateDefaultCleanUpTransforms(dest v1alpha1.ClusterLogDestination) []impl.LogTransform

func CreateDefaultTransforms

func CreateDefaultTransforms(dest v1alpha1.ClusterLogDestination) []impl.LogTransform

CreateDefaultTransforms creates predefined transform instruction for every log source

func CreateMultiLineTransforms added in v1.32.0

func CreateMultiLineTransforms(multiLineType v1alpha1.MultiLineParserType) []impl.LogTransform

func CreateTransformsFromFilter

func CreateTransformsFromFilter(filters []v1alpha1.LogFilter) (transforms []impl.LogTransform, err error)

func NewElasticsearchDestination

func NewElasticsearchDestination(name string, cspec v1alpha1.ClusterLogDestinationSpec) impl.LogDestination

func NewFileLogSource

func NewFileLogSource(name string, spec v1alpha1.FileSpec) impl.LogSource

func NewKubernetesLogSource

func NewKubernetesLogSource(name string, spec v1alpha1.KubernetesPodsSpec, namespaced bool) impl.LogSource

func NewLogstashDestination

func NewLogstashDestination(name string, cspec v1alpha1.ClusterLogDestinationSpec) impl.LogDestination

Types

type ClusterLoggingConfig

type ClusterLoggingConfig struct {
	metav1.TypeMeta `json:",inline"`
	// Standard object's metadata.
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Spec defines the behavior of a cluster log source.
	Spec ClusterLoggingConfigSpec `json:"spec"`

	Status v1alpha1.ClusterLoggingConfigStatus `json:"status,omitempty"`
}

type ClusterLoggingConfigSpec

type ClusterLoggingConfigSpec struct {
	// Type of cluster log source: KubernetesPods, File
	Type string `json:"type,omitempty"`

	// KubernetesPods describes spec for kubernetes pod source
	KubernetesPods v1alpha1.KubernetesPodsSpec `json:"kubernetesPods,omitempty"`

	// File describes spec for file source
	File v1alpha1.FileSpec `json:"file,omitempty"`

	// Transforms set ordered array of transforms. Possible values you can find into crd
	Transforms []impl.LogTransform `json:"transforms"`

	// DestinationRefs slice of ClusterLogDestination names
	DestinationRefs []string `json:"destinationRefs,omitempty"`
}

type CommonTLS

type CommonTLS struct {
	CAFile         string `json:"ca_file,omitempty"`
	CertFile       string `json:"crt_file,omitempty"`
	KeyFile        string `json:"key_file,omitempty"`
	KeyPass        string `json:"key_pass,omitempty"`
	VerifyHostname bool   `json:"verify_hostname"`
}

type CommonTransform

type CommonTransform struct {
	Name   string   `json:"-"`
	Type   string   `json:"type"`
	Inputs []string `json:"inputs"`
}

func (*CommonTransform) GetInputs

func (cs *CommonTransform) GetInputs() []string

func (*CommonTransform) GetName

func (cs *CommonTransform) GetName() string

func (*CommonTransform) SetInputs

func (cs *CommonTransform) SetInputs(inp []string)

func (*CommonTransform) SetName

func (cs *CommonTransform) SetName(name string)

type DynamicTransform

type DynamicTransform struct {
	CommonTransform

	DynamicArgsMap map[string]interface{} `json:"-"`
}

func (DynamicTransform) MarshalJSON

func (t DynamicTransform) MarshalJSON() ([]byte, error)

func (DynamicTransform) UnmarshalYAML

func (t DynamicTransform) UnmarshalYAML(unmarshal func(interface{}) error) error

type ElasticsearchAuth

type ElasticsearchAuth struct {
	Password      string `json:"password,omitempty"`
	Strategy      string `json:"strategy,omitempty"`
	User          string `json:"user,omitempty"`
	AwsAccessKey  string `json:"access_key_id,omitempty"`
	AwsSecretKey  string `json:"secret_access_key,omitempty"`
	AwsAssumeRole string `json:"assume_role,omitempty"`
}

type ElasticsearchBulk added in v1.32.4

type ElasticsearchBulk struct {
	Action string `json:"action,omitempty"`
	Index  string `json:"index,omitempty"`
}

type ElasticsearchEncoding

type ElasticsearchEncoding struct {
	ExceptFields    []string `json:"except_fields,omitempty"`
	OnlyFields      []string `json:"only_fields,omitempty"`
	TimestampFormat string   `json:"timestamp_format,omitempty"`
}

type LogConfigGenerator

type LogConfigGenerator struct {
	// contains filtered or unexported fields
}

func NewLogConfigGenerator

func NewLogConfigGenerator() *LogConfigGenerator

func (*LogConfigGenerator) AppendLogPipeline

func (vcg *LogConfigGenerator) AppendLogPipeline(inputSource impl.LogSource, transforms []impl.LogTransform, destinations []impl.LogDestination)

func (*LogConfigGenerator) BuildTransformsFromMapSlice

func (vcg *LogConfigGenerator) BuildTransformsFromMapSlice(inputName string, trans []impl.LogTransform) ([]impl.LogTransform, error)

func (*LogConfigGenerator) GenerateConfig

func (vcg *LogConfigGenerator) GenerateConfig() ([]byte, error)

type LogstashEncoding

type LogstashEncoding struct {
	ExceptFields    []string `json:"except_fields,omitempty"`
	OnlyFields      []string `json:"only_fields,omitempty"`
	Codec           string   `json:"codec,omitempty"`
	TimestampFormat string   `json:"timestamp_format,omitempty"`
}

type LogstashKeepalive added in v1.32.0

type LogstashKeepalive struct {
	TimeSecs int `json:"time_secs"`
}

type LogstashTLS

type LogstashTLS struct {
	CommonTLS         `json:",inline"`
	VerifyCertificate bool `json:"verify_certificate"`
	Enabled           bool `json:"enabled"`
}

type LokiEncoding

type LokiEncoding struct {
	Codec           string   `json:"codec,omitempty"`
	OnlyFields      []string `json:"only_fields,omitempty"`
	TimestampFormat string   `json:"timestamp_format,omitempty"`
}

type PodLoggingConfig

type PodLoggingConfig struct {
	metav1.TypeMeta `json:",inline"`
	// Standard object's metadata.
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Spec defines the behavior of a namespaced log source.
	Spec PodLoggingConfigSpec `json:"spec"`

	// Most recently observed status of a namespaced log source.
	Status v1alpha1.PodLoggingConfigStatus `json:"status,omitempty"`
}

PodLoggingConfig specify target for kubernetes pods logs collecting in specified namespace

type PodLoggingConfigSpec

type PodLoggingConfigSpec struct {
	// LabelSelector filter pods by label
	LabelSelector metav1.LabelSelector `json:"labelSelector,omitempty"`

	// Transforms set ordered array of transforms. Possible values you can find into crd
	Transforms []impl.LogTransform `json:"transforms"`

	// ClusterDestinationRefs slice of ClusterLogDestination names
	ClusterDestinationRefs []string `json:"clusterDestinationRefs,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL