Documentation ¶
Index ¶
- Constants
- Variables
- type Alerting
- type Indicator
- type LatencyIndicator
- type Metric
- type MultiBurnRateAlert
- type Objective
- func (o Objective) AlertName() string
- func (o Objective) Alerts() ([]MultiBurnRateAlert, error)
- func (o Objective) Burnrate(timerange time.Duration) string
- func (o Objective) BurnrateName(rate time.Duration) string
- func (o Objective) Burnrates() (monitoringv1.RuleGroup, error)
- func (o Objective) DurationRange(timerange time.Duration, percentile float64) string
- func (o Objective) ErrorsRange(timerange time.Duration) string
- func (o Objective) GenericRules() (monitoringv1.RuleGroup, error)
- func (o Objective) Grouping() []string
- func (o Objective) HasWindows(short, long model.Duration) (Window, bool)
- func (o Objective) IncreaseRules() (monitoringv1.RuleGroup, error)
- func (o Objective) Name() string
- func (o Objective) QueryBurnrate(timerange time.Duration, groupingMatchers []*labels.Matcher) (string, error)
- func (o Objective) QueryErrorBudget() string
- func (o Objective) QueryErrors(window model.Duration) string
- func (o Objective) QueryTotal(window model.Duration) string
- func (o Objective) RequestRange(timerange time.Duration) string
- func (o Objective) Windows() []Window
- type RatioIndicator
- type Window
Constants ¶
View Source
const ( // PropagationLabelsPrefix provides a way to propagate labels from the // ObjectMeta to the PrometheusRule. PropagationLabelsPrefix = "pyrra.dev/" )
Variables ¶
View Source
var ErrGroupingUnsupported = errors.New("objective with grouping not supported in generic rules")
Functions ¶
This section is empty.
Types ¶
type Indicator ¶
type Indicator struct { Ratio *RatioIndicator Latency *LatencyIndicator }
type LatencyIndicator ¶
type MultiBurnRateAlert ¶
type Objective ¶
type Objective struct { Labels labels.Labels Annotations map[string]string Description string Target float64 Window model.Duration Config string Alerting Alerting Indicator Indicator }
func (Objective) Alerts ¶
func (o Objective) Alerts() ([]MultiBurnRateAlert, error)
func (Objective) BurnrateName ¶ added in v0.4.3
func (Objective) DurationRange ¶ added in v0.5.0
func (Objective) GenericRules ¶ added in v0.5.0
func (o Objective) GenericRules() (monitoringv1.RuleGroup, error)
func (Objective) HasWindows ¶ added in v0.4.0
func (Objective) IncreaseRules ¶ added in v0.3.0
func (o Objective) IncreaseRules() (monitoringv1.RuleGroup, error)
func (Objective) QueryBurnrate ¶ added in v0.4.3
func (Objective) QueryErrorBudget ¶
func (Objective) QueryErrors ¶
QueryErrors returns a PromQL query to get the amount of request errors during the window.
func (Objective) QueryTotal ¶
QueryTotal returns a PromQL query to get the total amount of requests served during the window.
type RatioIndicator ¶
Click to show internal directories.
Click to hide internal directories.