Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlertingRule ¶
type AlertingRule struct { Alert string `json:"alert" yaml:"alert"` Expr string `json:"expr" yaml:"expr"` Labels map[string]string `json:"labels" yaml:"labels"` Annotations map[string]string `json:"annotations" yaml:"annotations"` }
func (*AlertingRule) Prometheus ¶
func (r *AlertingRule) Prometheus() rulefmt.RuleNode
type RecordingRule ¶
type RecordingRule struct { Record string `json:"record" yaml:"record"` Expr string `json:"expr" yaml:"expr"` Labels map[string]string `json:"labels" yaml:"labels"` }
func (*RecordingRule) Prometheus ¶
func (r *RecordingRule) Prometheus() rulefmt.RuleNode
type RuleGenerator ¶
type RuleGenerator struct {
// contains filtered or unexported fields
}
func NewRuleGenerator ¶
func NewRuleGenerator() *RuleGenerator
func (*RuleGenerator) GenerateAlertingRules ¶
func (g *RuleGenerator) GenerateAlertingRules( s *spec.Spec, ) error
func (*RuleGenerator) GenerateRecordingRules ¶
func (g *RuleGenerator) GenerateRecordingRules( s *spec.Spec, ) error
func (*RuleGenerator) RuleGroups ¶
func (g *RuleGenerator) RuleGroups() *RuleGroups
type RuleGroup ¶
type RuleGroup struct { Name string `json:"name" yaml:"name"` Interval model.Duration `json:"interval,omitempty" yaml:"interval,omitempty"` Rules []Rule `json:"rules" yaml:"rules"` }
func (RuleGroup) Prometheus ¶
type RuleGroups ¶
type RuleGroups struct {
Groups []*RuleGroup `json:"groups" yaml:"rules"`
}
func (RuleGroups) Prometheus ¶
func (rgs RuleGroups) Prometheus() rulefmt.RuleGroups
Click to show internal directories.
Click to hide internal directories.