metrics

package
v0.0.0-...-e561cac Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// metricsPortName specifies the portname used for Prometheus monitoring
	PortName = "metrics"
	// Host is the host address used by Windows metrics
	Host = "0.0.0.0"
	// Port is the port number on which windows-exporter is exposed.
	Port int32 = 9182
	// WindowsMetricsResource is the name for objects created for Prometheus monitoring
	// by current operator version. Its name is defined through the bundle manifests
	WindowsMetricsResource = "windows-exporter"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// a handle that allows us to interact with the Kubernetes API.
	*kubernetes.Clientset
	// a handle that allows us to interact with the Monitoring API.
	*monclient.MonitoringV1Client
	// contains filtered or unexported fields
}

Config holds the information required to interact with metrics objects

func NewConfig

func NewConfig(mgr manager.Manager, cfg *rest.Config, namespace string) (*Config, error)

NewConfig creates a new instance for Config to be used by the caller.

func (*Config) Configure

func (c *Config) Configure(ctx context.Context) error

Configure takes care of all the required configuration steps for Prometheus monitoring like validating monitoring label and creating metrics Endpoints object.

type PrometheusNodeConfig

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

PrometheusNodeConfig holds the information required to configure Prometheus, so that it can scrape metrics from the given endpoint address

func NewPrometheusNodeConfig

func NewPrometheusNodeConfig(clientset *kubernetes.Clientset, watchNamespace string) (*PrometheusNodeConfig, error)

NewPrometheuopsNodeConfig creates a new instance for prometheusNodeConfig to be used by the caller.

func (*PrometheusNodeConfig) Configure

func (pc *PrometheusNodeConfig) Configure() error

Configure patches the endpoint object to reflect the current list Windows nodes.

Jump to

Keyboard shortcuts

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