collector

package
v0.0.0-...-7983b3b Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

README

package collector

This package is responsible for providing any resource and functionality needed in a check life cycle: create a check instance, schedule a check, running a check are all operations implemented in this package or one of the subpackages.

For further details, please refer to the specific READMEs:

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetChecksByNameForConfigs

func GetChecksByNameForConfigs(checkName string, configs []integration.Config) []check.Check

GetChecksByNameForConfigs returns checks matching name for passed in configs

func GetLoaderErrors

func GetLoaderErrors() map[string]map[string]string

GetLoaderErrors returns the check loader errors

Types

type CheckScheduler

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

CheckScheduler is the check scheduler

func InitCheckScheduler

func InitCheckScheduler(collector *Collector) *CheckScheduler

InitCheckScheduler creates and returns a check scheduler

func (*CheckScheduler) AddLoader

func (s *CheckScheduler) AddLoader(loader check.Loader)

AddLoader adds a new Loader that AutoConfig can use to load a check.

func (*CheckScheduler) GetChecksFromConfigs

func (s *CheckScheduler) GetChecksFromConfigs(configs []integration.Config, populateCache bool) []check.Check

GetChecksFromConfigs gets all the check instances for given configurations optionally can populate the configToChecks cache

func (*CheckScheduler) Schedule

func (s *CheckScheduler) Schedule(configs []integration.Config)

Schedule schedules configs to checks

func (*CheckScheduler) Stop

func (s *CheckScheduler) Stop()

Stop handles clean stop of registered schedulers

func (*CheckScheduler) Unschedule

func (s *CheckScheduler) Unschedule(configs []integration.Config)

Unschedule unschedules checks matching configs

type Collector

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

Collector abstract common operations about running a Check

func NewCollector

func NewCollector(paths ...string) *Collector

NewCollector create a Collector instance and sets up the Python Environment

func (*Collector) GetAllInstanceIDs

func (c *Collector) GetAllInstanceIDs(checkName string) []check.ID

GetAllInstanceIDs returns the ID's of all instances of a check

func (*Collector) ReloadAllCheckInstances

func (c *Collector) ReloadAllCheckInstances(name string, newInstances []check.Check) ([]check.ID, error)

ReloadAllCheckInstances completely restarts a check with a new configuration

func (*Collector) RunCheck

func (c *Collector) RunCheck(ch check.Check) (check.ID, error)

RunCheck sends a Check in the execution queue

func (*Collector) Stop

func (c *Collector) Stop()

Stop halts any component involved in running a Check and shuts down the Python Environment

func (*Collector) StopCheck

func (c *Collector) StopCheck(id check.ID) error

StopCheck halts a check and remove the instance

Directories

Path Synopsis
defaults
Package defaults provides common defaults used in agent checks
Package defaults provides common defaults used in agent checks
cluster
Package cluster provides core checks for cluster level checks, used by the Datadog Cluster Agent.
Package cluster provides core checks for cluster level checks, used by the Datadog Cluster Agent.
cluster/dockerswarm
Package dockerswarm provides core checks for docker swarm topology
Package dockerswarm provides core checks for docker swarm topology
cluster/kubeapi
Package kubeapi provides core checks for kubernetes api
Package kubeapi provides core checks for kubernetes api
containers
Package containers provides core checks for containers and orchestrators
Package containers provides core checks for containers and orchestrators
containers/topology
Package topology is responsible for gathering topology for containers StackState
Package topology is responsible for gathering topology for containers StackState
net
Package net provides core checks for networking
Package net provides core checks for networking
nvidia/jetson
Package nvidia provides core checks for Nvidia's jetson device family
Package nvidia provides core checks for Nvidia's jetson device family
system
Package system provides core checks for OS-level system metrics
Package system provides core checks for OS-level system metrics
systemd
Package systemd provides core checks for systemd
Package systemd provides core checks for systemd
Package metadata implements specific Metadata Collectors for the Agent.
Package metadata implements specific Metadata Collectors for the Agent.

Jump to

Keyboard shortcuts

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