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
Click to show internal directories.
Click to hide internal directories.