Documentation ¶
Overview ¶
Package crd handles Managed Prometheus Custom Resource Definitions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Group ¶
type Group struct { Name string `yaml:"name"` Interval string `yaml:"interval"` Rules []Rule `yaml:"rules"` }
Group of Rules.
type Rule ¶
type Rule struct { Alert string `yaml:"alert"` Expr string `yaml:"expr"` For string `yaml:"for,omitempty"` Labels map[string]string `yaml:"labels"` Annotations map[string]string `yaml:"annotations"` }
Rule is a single Prometheus Alert.
type Rules ¶
type Rules struct { Version string `yaml:"apiVersion"` Kind string `yaml:"kind"` MetaData MetaData `yaml:"metadata"` Spec Spec `yaml:"spec"` }
Rules Custom Resource representation.
In theory we should be able to import this from the Managed Prometheus repo, but they don't currently provide a separate repo with just the json annotated structs.
func (*Rules) AddAbsentRules ¶
AddAbsentRules adds an `absent()` alert for each Rule, where possible.
Click to show internal directories.
Click to hide internal directories.