agent

package
v0.0.0-...-afcb601 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package agent contains a process-agent component

Package agent contains a process-agent component

Index

Constants

This section is empty.

Variables

View Source
var (

	// Once module variable, exported for testing
	Once sync.Once
)

Functions

func Enabled

func Enabled(config config.Component, checkComponents []types.CheckComponent, l log.Component) bool

Enabled determines whether the process agent is enabled based on the configuration. Enabled will only be run once, to prevent duplicate logging. The process-agent component on linux can be run in the core agent or as a standalone process-agent depending on the configuration. It will run as a standalone Process-agent if 'run_in_core_agent' is not enabled or the connections/NPM check is enabled. If 'run_in_core_agent' flag is enabled and the connections/NPM check is not enabled, the process-agent will run in the core agent.

Types

type Component

type Component interface {
	// Enabled returns whether the process agent is enabled
	Enabled() bool
}

Component is the process agent component type

type FlareHelper

type FlareHelper struct {
	Checks []checks.Check
}

FlareHelper is a helper struct to fill the flare with check output.

func NewFlareHelper

func NewFlareHelper(checks []checks.Check) *FlareHelper

NewNewFlareHelper creates a new FlareHelper to be provided by the process agent component.

func (*FlareHelper) FillFlare

func (fh *FlareHelper) FillFlare(fb flaretypes.FlareBuilder) error

FillFlare is the callback function for the flare.

type StatusProvider

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

StatusProvider is the type for process component status methods

func NewStatusProvider

func NewStatusProvider(Config config.Component) *StatusProvider

NewStatusProvider fetches the status

func (StatusProvider) HTML

func (s StatusProvider) HTML(_ bool, _ io.Writer) error

HTML renders the html output

func (StatusProvider) JSON

func (s StatusProvider) JSON(_ bool, stats map[string]interface{}) error

JSON populates the status map

func (StatusProvider) Name

func (s StatusProvider) Name() string

Name returns the name

func (StatusProvider) Section

func (s StatusProvider) Section() string

Section return the section

func (StatusProvider) Text

func (s StatusProvider) Text(_ bool, buffer io.Writer) error

Text renders the text output

Directories

Path Synopsis
Package agentimpl implements a component for the process agent.
Package agentimpl implements a component for the process agent.

Jump to

Keyboard shortcuts

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