Documentation ¶
Index ¶
- func APILabelSetToModelLabelSet(apiLabelSet open_api_models.LabelSet) prometheus_model.LabelSet
- func AlertToOpenAPIAlert(alert *types.Alert, status types.AlertStatus, receivers []string) *open_api_models.GettableAlert
- func CheckSilenceMatchesFilterLabels(s *silencepb.Silence, matchers []*labels.Matcher) bool
- func GettableSilenceFromProto(s *silencepb.Silence) (open_api_models.GettableSilence, error)
- func ModelLabelSetToAPILabelSet(modelLabelSet prometheus_model.LabelSet) open_api_models.LabelSet
- func OpenAPIAlertsToAlerts(apiAlerts open_api_models.PostableAlerts) []*types.Alert
- func PostableSilenceToProto(s *open_api_models.PostableSilence) (*silencepb.Silence, error)
- func SortSilences(sils open_api_models.GettableSilences)
- type API
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func APILabelSetToModelLabelSet ¶ added in v0.22.0
func APILabelSetToModelLabelSet(apiLabelSet open_api_models.LabelSet) prometheus_model.LabelSet
APILabelSetToModelLabelSet converts open_api_models.LabelSet to prometheus_model.LabelSet.
func AlertToOpenAPIAlert ¶ added in v0.22.0
func AlertToOpenAPIAlert(alert *types.Alert, status types.AlertStatus, receivers []string) *open_api_models.GettableAlert
AlertToOpenAPIAlert converts internal alerts, alert types, and receivers to *open_api_models.GettableAlert.
func CheckSilenceMatchesFilterLabels ¶ added in v0.22.0
CheckSilenceMatchesFilterLabels returns true if a given silence matches a list of matchers. A silence matches a filter (list of matchers) if for all matchers in the filter, there exists a matcher in the silence such that their names, types, and values are equivalent.
func GettableSilenceFromProto ¶ added in v0.22.0
func GettableSilenceFromProto(s *silencepb.Silence) (open_api_models.GettableSilence, error)
GettableSilenceFromProto converts *silencepb.Silence to open_api_models.GettableSilence.
func ModelLabelSetToAPILabelSet ¶ added in v0.22.0
func ModelLabelSetToAPILabelSet(modelLabelSet prometheus_model.LabelSet) open_api_models.LabelSet
ModelLabelSetToAPILabelSet converts prometheus_model.LabelSet to open_api_models.LabelSet.
func OpenAPIAlertsToAlerts ¶ added in v0.22.0
func OpenAPIAlertsToAlerts(apiAlerts open_api_models.PostableAlerts) []*types.Alert
OpenAPIAlertsToAlerts converts open_api_models.PostableAlerts to []*types.Alert.
func PostableSilenceToProto ¶ added in v0.22.0
func PostableSilenceToProto(s *open_api_models.PostableSilence) (*silencepb.Silence, error)
PostableSilenceToProto converts *open_api_models.PostableSilenc to *silencepb.Silence.
func SortSilences ¶ added in v0.22.0
func SortSilences(sils open_api_models.GettableSilences)
SortSilences sorts first according to the state "active, pending, expired" then by end time or start time depending on the state. active silences should show the next to expire first pending silences are ordered based on which one starts next expired are ordered based on which one expired most recently
Types ¶
Directories ¶
Path | Synopsis |
---|---|
Package restapi Alertmanager API API of the Prometheus Alertmanager (https://github.com/prometheus/alertmanager) Schemes: http Host: localhost BasePath: / Version: 0.0.1 License: Apache 2.0 http://www.apache.org/licenses/LICENSE-2.0.html Consumes: - application/json Produces: - application/json swagger:meta
|
Package restapi Alertmanager API API of the Prometheus Alertmanager (https://github.com/prometheus/alertmanager) Schemes: http Host: localhost BasePath: / Version: 0.0.1 License: Apache 2.0 http://www.apache.org/licenses/LICENSE-2.0.html Consumes: - application/json Produces: - application/json swagger:meta |