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 ¶
This section is empty.
Variables ¶
var ObserverName = "LogForwarderSupervisor" // nolint:gochecknoglobals
Functions ¶
This section is empty.
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 FBSupervisorConfig ¶
type FBSupervisorConfig struct { FluentBitExePath string FluentBitNRLibPath string FluentBitParsersPath string FluentBitVerbose bool }
func (*FBSupervisorConfig) IsLogForwarderAvailable ¶
func (c *FBSupervisorConfig) IsLogForwarderAvailable() bool
IsLogForwarderAvailable checks whether all the required files for FluentBit execution are available
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 // PassthroughEnvironment holds a copy of its homonym in config.Config. PassthroughEnvironment []string }
func NewManagerConfig ¶
func NewManagerConfig(verbose int, features map[string]bool, passthroughEnvs, configFolders, definitionFolders []string) ManagerConfig
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) 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.
Directories ¶
Path | Synopsis |
---|---|
cumulative
Package cumulative creates Count metrics from cumulative values.
|
Package cumulative creates Count metrics from cumulative values. |