target

package
v0.37.4 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SeverityLevels = map[int32]string{
	0: "emergency",
	1: "alert",
	2: "critical",
	3: "error",
	4: "warning",
	5: "notice",
	6: "informational",
	7: "debug",
}

SeverityLevels maps severity levels to severity string levels.

Functions

This section is empty.

Types

type Metrics

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

Metrics holds a set of gelf metrics.

func NewMetrics

func NewMetrics(reg prometheus.Registerer) *Metrics

NewMetrics creates a new set of gelf metrics. If reg is non-nil, the metrics will be registered.

type Target

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

Target listens to gelf messages on udp.

func NewTarget

func NewTarget(
	metrics *Metrics,
	logger log.Logger,
	handler loki.EntryHandler,
	relabel []*relabel.Config,
	config *scrapeconfig.GelfTargetConfig,
) (*Target, error)

NewTarget configures a new Gelf Target.

func (*Target) Details

func (t *Target) Details() interface{}

Details returns target-specific details.

func (*Target) DiscoveredLabels

func (t *Target) DiscoveredLabels() model.LabelSet

DiscoveredLabels returns the set of labels discovered by the gelf target, which is always nil. Implements Target.

func (*Target) Labels

func (t *Target) Labels() model.LabelSet

Labels returns the set of labels that statically apply to all log entries produced by the GelfTarget.

func (*Target) Ready

func (t *Target) Ready() bool

Ready indicates whether or not the gelf target is ready to be read from.

func (*Target) Stop

func (t *Target) Stop()

Stop shuts down the GelfTarget.

func (*Target) Type

func (t *Target) Type() target.TargetType

Type returns GelfTargetType.

Jump to

Keyboard shortcuts

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