monitoring

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModuleName                     = "monitoring"
	OperatorModeKey                = "operatorMode"
	MonitorTypeKey                 = "monitorType"
	IntervalKey                    = "interval"
	TimeoutKey                     = "timeout"
	SchemeKey                      = "scheme"
	DefaultMonitorType             = "Service"
	DefaultInterval                = "30s"
	DefaultTimeout                 = "15s"
	DefaultScheme                  = "http"
	PodMonitorType     MonitorType = "Pod"
	ServiceMonitorType MonitorType = "Service"
)

Variables

View Source
var (
	ErrTimeoutGreaterThanInterval = errors.New("timeout cannot be greater than interval")
	ErrPathAndPortEmpty           = errors.New("path and port must be present in monitoring configuration")
)

Functions

This section is empty.

Types

type Monitor

type Monitor struct {
	OperatorMode bool                  `yaml:"operatorMode,omitempty" json:"operatorMode,omitempty"`
	Interval     prometheusv1.Duration `yaml:"interval,omitempty" json:"interval,omitempty"`
	Timeout      prometheusv1.Duration `yaml:"timeout,omitempty" json:"timeout,omitempty"`
	MonitorType  MonitorType           `yaml:"monitorType,omitempty" json:"monitorType,omitempty"`
	Path         string                `yaml:"path,omitempty" json:"path,omitempty"`
	// Despite what the name suggests, PodMonitor and ServiceMonitor actually
	// only accept port names as the input. So in operator mode, this port field
	// need to be the user-provided port name.
	Port   string `yaml:"port,omitempty" json:"port,omitempty"`
	Scheme string `yaml:"scheme,omitempty" json:"scheme,omitempty"`
}

type MonitorType added in v0.10.0

type MonitorType string

Jump to

Keyboard shortcuts

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