Documentation ¶
Index ¶
- Constants
- Variables
- type Alerting
- type BoolGaugeIndicator
- type Indicator
- type IndicatorType
- type LatencyIndicator
- type LatencyNativeIndicator
- type Metric
- type MultiBurnRateAlert
- type Objective
- func (o Objective) AlertName() string
- func (o Objective) AlertNameAbsent() 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) Exhausts(factor float64) model.Duration
- 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) IndicatorType() IndicatorType
- 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 BoolGaugeIndicator ¶ added in v0.6.0
type Indicator ¶
type Indicator struct { Ratio *RatioIndicator Latency *LatencyIndicator LatencyNative *LatencyNativeIndicator BoolGauge *BoolGaugeIndicator }
type IndicatorType ¶ added in v0.6.0
type IndicatorType int
const ( Unknown IndicatorType = iota Ratio IndicatorType = iota Latency IndicatorType = iota LatencyNative IndicatorType = iota BoolGauge IndicatorType = iota )
type LatencyIndicator ¶
type LatencyNativeIndicator ¶ added in v0.7.0
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) AlertNameAbsent ¶ added in v0.8.0
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) IndicatorType ¶ added in v0.6.0
func (o Objective) IndicatorType() IndicatorType
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.