monitoring

package
v0.0.35-0...-fad7822 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2023 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCheckers

func AddCheckers(node agent.Agent, config *Config) (err error)

AddCheckers adds checkers to the agent.

func AddMetrics

func AddMetrics(node agent.Agent, config *Config) error

AddMetrics exposes specific metrics to Prometheus

func GetKubeClient

func GetKubeClient() (*kubernetes.Clientset, error)

GetKubeClient returns a Kubernetes client that uses kubectl certificate for authentication

func GetPrivilegedKubeClient

func GetPrivilegedKubeClient() (*kubernetes.Clientset, error)

GetPrivilegedKubeClient returns a Kubernetes client that uses scheduler certificate for authentication

Types

type Config

type Config struct {
	// Role is the current agent's role
	Role agent.Role
	// AdvertiseIP is the planet agent's advertised IP address
	AdvertiseIP string
	// KubeAddr is the address of the kubernetes API server
	KubeAddr string
	// UpstreamNameservers lists additional upstream nameserver added to the DNS configuration
	UpstreamNameservers []string
	// LocalNameservers is a list of addresses local nameserver listens on
	LocalNameservers []string
	// DNSZones maps DNS zone to a list of nameservers
	DNSZones map[string][]string
	// RegistryAddr is the address of the private docker registry
	RegistryAddr string
	// NettestContainerImage is the name of the container image used for
	// networking test
	NettestContainerImage string
	// DisableInterPodCheck disables inter-pod communication tests
	DisableInterPodCheck bool
	// ETCDConfig defines etcd-specific configuration
	ETCDConfig etcdconf.Config
	// CloudProvider is the cloud provider backend this cluster is using
	CloudProvider string
	// NodeName is the kubernetes name of this node
	NodeName string
	// LowWatermark is the disk usage warning limit percentage of monitored directories
	LowWatermark uint
	// HighWatermark is the disk usage critical limit percentage of monitored directories
	HighWatermark uint
	// ServiceUID is the UID of the service (planet) user.
	ServiceUID string
	// ServiceGID is the GID of the service (planet) user.
	ServiceGID string
	// HTTPTimeout specifies the HTTP timeout for checks
	HTTPTimeout time.Duration
	// CriticalNamespaces lists the namespaces of critical system pods.
	CriticalNamespaces []string
}

Config represents configuration for setting up monitoring checkers.

func (*Config) CheckAndSetDefaults

func (c *Config) CheckAndSetDefaults() error

CheckAndSetDefaults validates monitoring configuration

func (*Config) LocalTransport

func (c *Config) LocalTransport() (*http.Transport, error)

LocalTransport returns http transport that is set up with local certificate authority and client certificates

func (Config) NewETCDConfig

func (c Config) NewETCDConfig() (*monitoring.ETCDConfig, error)

NewETCDConfig returns new ETCD configuration

type VersionCollector

type VersionCollector struct {
}

VersionCollector is a special type of probe that collects and reports versions of the internal components of planet

func NewVersionCollector

func NewVersionCollector() *VersionCollector

NewVersionCollector returns new instance of version collector probe

func (*VersionCollector) Check

func (r *VersionCollector) Check(ctx context.Context, reporter health.Reporter)

Check collects versions of all components and adds information to reporter

func (*VersionCollector) Name

func (r *VersionCollector) Name() string

Name returns name of this collector

Jump to

Keyboard shortcuts

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