Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CheckFailureTotal = promauto.NewCounterVec(prometheus.CounterOpts{ Name: utils.MetricSuffix + "_scheduler_check_failure", Help: "Total number of check failures during scheduling", }, []string{"func", "endpoint_name", "check_name"})
View Source
var CheckSuccessTotal = promauto.NewCounterVec(prometheus.CounterOpts{ Name: utils.MetricSuffix + "_scheduler_check_success", Help: "Total number of successful checks call during scheduling", }, []string{"func", "endpoint_name", "check_name"})
View Source
var EndpointFailureTotal = promauto.NewCounterVec(prometheus.CounterOpts{ Name: utils.MetricSuffix + "_scheduler_endpoint_failure", Help: "Total number of failures during scheduling for an endpoint", }, []string{"func", "endpoint_name"})
View Source
var EndpointSuccessTotal = promauto.NewCounterVec(prometheus.CounterOpts{ Name: utils.MetricSuffix + "_scheduler_endpoint_success", Help: "Total number of successful operations during scheduling for an endpoint", }, []string{"func", "endpoint_name"})
View Source
var SchedulerFailureTotal = promauto.NewCounterVec(prometheus.CounterOpts{ Name: utils.MetricSuffix + "_scheduler_failure", Help: "Total number of failures during scheduling", }, []string{"endpoint_name"})
Functions ¶
func Noop ¶
func Noop(topology.ProbeableEndpoint) error
Noop do nothing. It is a noop function to use in a check when there is nothing to do
Types ¶
type Check ¶
type Check struct {
// Name of the check
Name string
// Prepare function called once after the endpoint has been init
// Used to prepare the database the check (creating the monitoring keyspaces/buckets... etc)
PrepareFn func(topology.ProbeableEndpoint) error
// Check function called every Interval
// Used to monitor the endpoint, this should produce metrics for SLXs
CheckFn func(topology.ProbeableEndpoint) error
// Teardown function called just before terminating/closing an endpoint
// Used to clean the database if needed
TeardownFn func(topology.ProbeableEndpoint) error
// Interval at which the CheckFn is performed
Interval time.Duration
}
type CheckConfig ¶
type ProberWorker ¶
type ProberWorker struct {
// contains filtered or unexported fields
}
type ProbingScheduler ¶
type ProbingScheduler struct {
// contains filtered or unexported fields
}
func NewProbingScheduler ¶
func NewProbingScheduler(logger log.Logger, topologyUpdateChan chan topology.ClusterMap) ProbingScheduler
func (*ProbingScheduler) ManageProbes ¶
func (ps *ProbingScheduler) ManageProbes()
- listen for topology changes - start and stop probes
func (*ProbingScheduler) RegisterNewClusterCheck ¶
func (ps *ProbingScheduler) RegisterNewClusterCheck(check Check)
RegisterNewClusterCheck add a new check at the cluster level It will be executed once per cluster every check interval
func (*ProbingScheduler) RegisterNewNodeCheck ¶
func (ps *ProbingScheduler) RegisterNewNodeCheck(check Check)
RegisterNewClusterCheck add a new check level It will be executed once for each nodes every check interval
func (*ProbingScheduler) RunChecksIndependently ¶
func (ps *ProbingScheduler) RunChecksIndependently()
RunChecksIndependently makes the scheduler run each registered check in its own goroutine per endpoint, rather than sequentially in one shared worker. A slow check (e.g. a long durability sweep) then never delays the others. Opt-in: schedulers that don't call this keep the default sequential behavior.
func (*ProbingScheduler) Start ¶
func (ps *ProbingScheduler) Start()
Click to show internal directories.
Click to hide internal directories.