vector

package
v1.30.13 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const DestElasticsearch = "Elasticsearch"

engine names

View Source
const DestLogstash = "Logstash"
View Source
const DestLoki = "Loki"
View Source
const SourceFile = "File"
View Source
const SourceKubernetesPods = "KubernetesPods"

source names

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

Create default transforms

func CreateDefaultTransforms

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

Create default transforms

func CreateMultiLinaeTransforms

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

Create multiline transforms

func CreateTransformsFromFilter

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

Create transforms from filter

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"`
}

TLS configuration. Can be set for loki and ES

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 GenExtraFieldsTransform

func GenExtraFieldsTransform(extraFields map[string]string) DynamicTransform

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 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 LogstashTLS

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

TLS configuration. Can be set for loki and ES

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