Documentation
¶
Overview ¶
Copyright 2020 New Relic Corporation. All rights reserved. SPDX-License-Identifier: Apache-2.0
Copyright 2020 New Relic Corporation. All rights reserved. SPDX-License-Identifier: Apache-2.0
Index ¶
Constants ¶
const ( FbConfTempFolderNameDefault = "fb" MaxNumberOfFbConfigTempFiles int = 50 )
Variables ¶
var ObserverName = "LogForwarderSupervisor" // nolint:gochecknoglobals
Functions ¶
func NewFBSupervisorConfig ¶ added in v1.67.3
func NewFBSupervisorConfig( ffRetriever feature_flags.Retriever, agentDir string, integrationsDir string, loggingBinDir string, fluentBitExePath string, fluentBitNRLibPath string, fluentBitParsersPath string, fluentBitVerbose bool, confTempFolder string, ) fBSupervisorConfig
NewFBSupervisorConfig creates a new fBSupervisorConfig that will contain the FF retriever not exported to force using the constructor and ensuring it contains all necessary dependencies nolint:revive
Types ¶
type Executor ¶
type Executor interface {
// When writable a PID channel is provided, generated PID will be written.
Execute(ctx context.Context, pidChan, exitCodeCh chan<- int) executor.OutputReceive
}
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func NewManager( cfg ManagerConfig, configLoader v4Config.Loader, emitter emitter.Emitter, il integration.InstancesLookup, definitionQ chan integration.Definition, configEntryQ chan configrequest.Entry, tracker *track.Tracker, idLookup host.IDLookup, ) *Manager
NewManager loads all the integration configuration files from the given folders. It discards the integrations not belonging to the protocol V4. Usually, "configFolders" will be the value of the "pluginInstanceDir" configuration option The "definitionFolders" refer to the v3 definition yaml configs, placed here for v3 integrations backwards-support
func (*Manager) DisableOHIFromFF ¶
DisableOHIFromFF disables an integration coming from CC request. Formats btw CC FF and config files: see EnableOHIFromCmd
func (*Manager) EnableOHIFromFF ¶
EnableOHIFromFF enables an integration coming from CC request.
type ManagerConfig ¶
type ManagerConfig struct {
// ConfigPaths store the YAML integrations configurations.
// They may also contain -config.yml files from v3 integrations
ConfigPaths []string
AgentFeatures map[string]bool // features from agent config file
// DefinitionFolders store the v3 -definition.yml plugins (legacy support)
// and the executables where the agent will look for if only the 'name' property is specified for an integration
DefinitionFolders []string
// Defines verbosity level in v3 legacy integrations
Verbose int
// Defines TempDir folder in v3 legacy integrations
TempDir string
// PassthroughEnvironment holds a copy of its homonym in config.Config.
PassthroughEnvironment []string
}
func NewManagerConfig ¶
type ParseProcessOutput ¶
type SendEventFn ¶
SendEventFn wrapper for sending events to nr.
type Supervisor ¶
type Supervisor struct {
// contains filtered or unexported fields
}
Supervisor is a wrapper for starting and supervising external processes.
func NewFBSupervisor ¶
func NewFBSupervisor(fbIntCfg fBSupervisorConfig, cfgLoader *logs.CfgLoader, agentIDNotifier id.UpdateNotifyFn, notifier hostname.ChangeNotifier, sendEventFn SendEventFn) *Supervisor
NewFBSupervisor builds a Fluent Bit supervisor which forwards the output to agent logs.
func (*Supervisor) Restart ¶ added in v1.67.3
func (s *Supervisor) Restart() error
func (*Supervisor) Run ¶
func (s *Supervisor) Run(ctx ctx2.Context)
type SupervisorEvent ¶
type SupervisorEvent struct {
sample.BaseEvent
Summary string `json:"summary"`
ExitStatus string `json:"exitStatus"`
}
SupervisorEvent will be used to create an InfrastructureEvent when fb start/stop.
func NewSupervisorEvent ¶
func NewSupervisorEvent(eventSummary string, status cmdExitStatus) *SupervisorEvent
NewSupervisorEvent create a new SupervisorEvent instance. For running ongoing pass -1.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
cumulative
Package cumulative creates Count metrics from cumulative values.
|
Package cumulative creates Count metrics from cumulative values. |
|
cfgreq
command
|
|
|
cmdreq
command
|
|
|
environment
command
|
|
|
huge
command
|
|
|
longrunning_hb
command
|
|
|
longtime
command
|
|
|
protocol_v4
command
|
|
|
simple
command
|
|
|
validyaml
command
|
|
