journal

package
v0.0.0-...-e951c9a Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2022 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JournalTarget

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

JournalTarget tails systemd journal entries. nolint

func NewJournalTarget

func NewJournalTarget(
	metrics *Metrics,
	logger log.Logger,
	handler api.EntryHandler,
	positions positions.Positions,
	jobName string,
	relabelConfig []*relabel.Config,
	targetConfig *scrapeconfig.JournalTargetConfig,
) (*JournalTarget, error)

NewJournalTarget configures a new JournalTarget.

func (*JournalTarget) Details

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

Details returns target-specific details.

func (*JournalTarget) DiscoveredLabels

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

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

func (*JournalTarget) Labels

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

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

func (*JournalTarget) Ready

func (t *JournalTarget) Ready() bool

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

func (*JournalTarget) Stop

func (t *JournalTarget) Stop() error

Stop shuts down the JournalTarget.

func (*JournalTarget) Type

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

Type returns JournalTargetType.

type JournalTargetManager

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

JournalTargetManager manages a series of JournalTargets. nolint

func NewJournalTargetManager

func NewJournalTargetManager(
	metrics *Metrics,
	logger log.Logger,
	positions positions.Positions,
	client api.EntryHandler,
	scrapeConfigs []scrapeconfig.Config,
) (*JournalTargetManager, error)

NewJournalTargetManager creates a new JournalTargetManager.

func (*JournalTargetManager) ActiveTargets

func (tm *JournalTargetManager) ActiveTargets() map[string][]target.Target

ActiveTargets returns the list of JournalTargets where journal data is being read. ActiveTargets is an alias to AllTargets as JournalTargets cannot be deactivated, only stopped.

func (*JournalTargetManager) AllTargets

func (tm *JournalTargetManager) AllTargets() map[string][]target.Target

AllTargets returns the list of all targets where journal data is currently being read.

func (*JournalTargetManager) Ready

func (tm *JournalTargetManager) Ready() bool

Ready returns true if at least one JournalTarget is also ready.

func (*JournalTargetManager) Stop

func (tm *JournalTargetManager) Stop()

Stop stops the JournalTargetManager and all of its JournalTargets.

type Metrics

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

Metrics holds a set of journal target metrics.

func NewMetrics

func NewMetrics(reg prometheus.Registerer) *Metrics

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

Jump to

Keyboard shortcuts

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