autodiscoveryimpl

package
v0.0.0-...-350038e Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2025 License: Apache-2.0 Imports: 46 Imported by: 0

Documentation

Overview

Package autodiscoveryimpl implements the agent's autodiscovery mechanism.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfigErrors

func GetConfigErrors() map[string]string

GetConfigErrors gets the config errors

func GetResolveWarnings

func GetResolveWarnings() map[string][]string

GetResolveWarnings get the resolve warnings/errors

func Module

func Module() fxutil.Module

Module defines the fx options for this component.

Types

type AutoConfig

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

AutoConfig implements the agent's autodiscovery mechanism. It is responsible to collect integrations configurations from different sources and then "schedule" or "unschedule" them by notifying subscribers. See the module README for details.

func (*AutoConfig) AddConfigProvider

func (ac *AutoConfig) AddConfigProvider(provider providerTypes.ConfigProvider, shouldPoll bool, pollInterval time.Duration)

AddConfigProvider adds a new configuration provider to AutoConfig. Callers must pass a flag to indicate whether the configuration provider expects to be polled and at which interval or it's fine for it to be invoked only once in the Agent lifetime. If the config provider is polled, the routine is scheduled right away

func (*AutoConfig) AddListeners

func (ac *AutoConfig) AddListeners(listenerConfigs []pkgconfigsetup.Listeners)

AddListeners tries to initialise the listeners listed in the given configs. A first try is done synchronously. If a listener fails with a ErrWillRetry, the initialization will be re-triggered later until success or ErrPermaFail.

func (*AutoConfig) AddScheduler

func (ac *AutoConfig) AddScheduler(name string, s scheduler.Scheduler, replayConfigs bool)

AddScheduler a new scheduler to receive configurations.

Previously scheduled configurations that have not subsequently been unscheduled can be replayed with the replayConfigs flag. This replay occurs immediately, before the AddScheduler call returns.

func (*AutoConfig) GetAllConfigs

func (ac *AutoConfig) GetAllConfigs() []integration.Config

GetAllConfigs returns all resolved and non-template configs known to AutoConfig.

func (*AutoConfig) GetAutodiscoveryErrors

func (ac *AutoConfig) GetAutodiscoveryErrors() map[string]map[string]providerTypes.ErrorMsgSet

GetAutodiscoveryErrors fetches AD errors from each ConfigProvider. The resulting data structure maps provider name to resource name to a set of unique error messages. The resource names do not match other identifiers and are only intended for display in diagnostic tools like `agent status`.

func (*AutoConfig) GetConfigCheck

func (ac *AutoConfig) GetConfigCheck() integration.ConfigCheckResponse

GetConfigCheck returns scrubbed information from all configuration providers

func (*AutoConfig) GetIDOfCheckWithEncryptedSecrets

func (ac *AutoConfig) GetIDOfCheckWithEncryptedSecrets(checkID checkid.ID) checkid.ID

GetIDOfCheckWithEncryptedSecrets returns the ID that a checkID had before decrypting its secrets. Returns empty if the check with the given ID does not have any secrets.

func (*AutoConfig) GetProviderCatalog

func (ac *AutoConfig) GetProviderCatalog() map[string]providerTypes.ConfigProviderFactory

GetProviderCatalog returns all registered ConfigProviderFactory.

func (*AutoConfig) GetTelemetryStore

func (ac *AutoConfig) GetTelemetryStore() *acTelemetry.Store

GetTelemetryStore returns autodiscovery telemetry store.

func (*AutoConfig) GetUnresolvedConfigs

func (ac *AutoConfig) GetUnresolvedConfigs() []integration.Config

GetUnresolvedConfigs returns all resolved and non-template configs known to AutoConfig.

func (*AutoConfig) LoadAndRun

func (ac *AutoConfig) LoadAndRun(ctx context.Context)

LoadAndRun loads all of the integration configs it can find and schedules them. Should always be run once so providers that don't need polling will be queried at least once

func (*AutoConfig) RemoveScheduler

func (ac *AutoConfig) RemoveScheduler(name string)

RemoveScheduler allows to remove a scheduler from the AD system.

Jump to

Keyboard shortcuts

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