Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlertingRule ¶
type AlertingRule struct { // State can be "pending", "firing", "inactive". State string `json:"state"` Name string `json:"name"` Query string `json:"query"` Duration float64 `json:"duration"` Labels labels.Labels `json:"labels"` Annotations labels.Labels `json:"annotations"` Alerts []*Alert `json:"alerts"` Health rules.RuleHealth `json:"health"` LastError string `json:"lastError,omitempty"` EvaluationTime float64 `json:"evaluationTime"` LastEvaluation time.Time `json:"lastEvaluation"` // Type of an AlertingRule is always "alerting". Type string `json:"type"` }
type RecordingRule ¶
type RecordingRule struct { Name string `json:"name"` Query string `json:"query"` Labels labels.Labels `json:"labels"` Health rules.RuleHealth `json:"health"` LastError string `json:"lastError,omitempty"` EvaluationTime float64 `json:"evaluationTime"` LastEvaluation time.Time `json:"lastEvaluation"` // Type of a prometheusRecordingRule is always "recording". Type string `json:"type"` }
type RuleDiscovery ¶
type RuleDiscovery struct {
RuleGroups []*RuleGroup `json:"groups"`
}
type RuleGroup ¶
type RuleGroup struct { Name string `json:"name"` File string `json:"file"` Rules []Rule `json:"rules"` Interval float64 `json:"interval"` EvaluationTime float64 `json:"evaluationTime"` LastEvaluation time.Time `json:"lastEvaluation"` Limit int `json:"limit"` PartialResponseStrategy string `json:"partialResponseStrategy"` }
Same as https://github.com/prometheus/prometheus/blob/c530b4b456cc5f9ec249f771dff187eb7715dc9b/web/api/v1/api.go#L955 but with Partial Response.
func (*RuleGroup) MarshalJSON ¶ added in v0.15.0
https://github.com/prometheus/prometheus/blob/c530b4b456cc5f9ec249f771dff187eb7715dc9b/web/api/v1/api.go#L1016 MarshalJSON marshals a rulegroup while ensuring that `rules' is always non-empty.
Click to show internal directories.
Click to hide internal directories.