# Packages
No description provided by the author
No description provided by the author
Package restapi Alertmanager API
API of the Prometheus Alertmanager (https://github.com/prometheus/alertmanager) Schemes: http Host: localhost BasePath: /api/v2/ 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.
# Functions
AlertToOpenAPIAlert converts internal alerts, alert types, and receivers to *open_api_models.GettableAlert.
APILabelSetToModelLabelSet converts open_api_models.LabelSet to prometheus_model.LabelSet.
CheckSilenceMatchesFilterLabels returns true if a given silence matches a list of matchers.
GettableSilenceFromProto converts *silencepb.Silence to open_api_models.GettableSilence.
ModelLabelSetToAPILabelSet converts prometheus_model.LabelSet to open_api_models.LabelSet.
NewAPI returns a new Alertmanager API v2.
OpenAPIAlertsToAlerts converts open_api_models.PostableAlerts to []*types.Alert.
PostableSilenceToProto converts *open_api_models.PostableSilenc to *silencepb.Silence.
SortSilences sorts first according to the state "active, pending, expired" then by end time or start time depending on the state.