logcollector

package
v2.16.3 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: AGPL-3.0 Imports: 23 Imported by: 0

Documentation

Overview

Copyright (c) Edgeless Systems GmbH

SPDX-License-Identifier: AGPL-3.0-only

Package logcollector uses podman to deploy logstash and filebeat containers in order to collect logs centrally for debugging purposes.

Index

Constants

This section is empty.

Variables

View Source
var (
	// DebugdLogcollectPrefix is the prefix for all OpenSearch fields specified by the user when starting through debugd.
	DebugdLogcollectPrefix = "logcollect."
	// AllowedFields are the fields that are allowed to be used in the logcollection.
	AllowedFields = map[string]struct{}{
		"admin":            {},
		"is_debug_cluster": {},

		"github.actor":            {},
		"github.workflow":         {},
		"github.run-id":           {},
		"github.run-attempt":      {},
		"github.ref-name":         {},
		"github.sha":              {},
		"github.runner-os":        {},
		"github.e2e-test-payload": {},
		"github.is-debug-cluster": {},

		"github.e2e-test-provider":   {},
		"github.ref-stream":          {},
		"github.kubernetes-version":  {},
		"github.cluster-creation":    {},
		"github.attestation-variant": {},
		"deployment-type":            {},
	}
)

Functions

func NewStartTrigger

func NewStartTrigger(ctx context.Context, wg *sync.WaitGroup, provider cloudprovider.Provider,
	metadata providerMetadata, logger *slog.Logger,
) func(*info.Map)

NewStartTrigger returns a trigger func can be registered with an infos instance. The trigger is called when infos changes to received state and starts a log collection pod with filebeat, metricbeat and logstash in case the flags are set.

This requires podman to be installed.

Types

type Fields added in v2.11.0

type Fields map[string]string

Fields are the OpenSearch fields that are associated with a log message.

func FieldsFromMap added in v2.11.0

func FieldsFromMap(m map[string]string) Fields

FieldsFromMap returns new Fields from the given map.

func (Fields) Check added in v2.11.0

func (f Fields) Check() error

Check checks whether all the fields in f are allowed. For fields that are prefixed with the debugd logcollect prefix are only the subkeys are checked.

func (Fields) Extend added in v2.11.0

func (f Fields) Extend(other Fields) Fields

Extend adds the fields from other to f and returns the result.

Jump to

Keyboard shortcuts

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