mirror of
https://github.com/prymitive/karma
synced 2026-05-05 03:16:51 +00:00
feat(api): expose alert.inhibitedBy in the API
This commit is contained in:
@@ -310,14 +310,15 @@ func (am *Alertmanager) pullAlerts(version string) error {
|
||||
|
||||
alert.Alertmanager = []models.AlertmanagerInstance{
|
||||
models.AlertmanagerInstance{
|
||||
Name: am.Name,
|
||||
Cluster: am.ClusterID(),
|
||||
State: alert.State,
|
||||
StartsAt: alert.StartsAt,
|
||||
EndsAt: alert.EndsAt,
|
||||
Source: alert.GeneratorURL,
|
||||
Silences: silences,
|
||||
SilencedBy: alert.SilencedBy,
|
||||
Name: am.Name,
|
||||
Cluster: am.ClusterID(),
|
||||
State: alert.State,
|
||||
StartsAt: alert.StartsAt,
|
||||
EndsAt: alert.EndsAt,
|
||||
Source: alert.GeneratorURL,
|
||||
Silences: silences,
|
||||
SilencedBy: alert.SilencedBy,
|
||||
InhibitedBy: alert.InhibitedBy,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -19,8 +19,8 @@ type AlertmanagerInstance struct {
|
||||
// in api responses, this is used internally
|
||||
Silences map[string]*Silence `json:"-"`
|
||||
// export list of silenced IDs in api response
|
||||
SilencedBy []string `json:"silencedBy"`
|
||||
// TODO also export InhibitedBy here if it ever becomes needed
|
||||
SilencedBy []string `json:"silencedBy"`
|
||||
InhibitedBy []string `json:"inhibitedBy"`
|
||||
}
|
||||
|
||||
// AlertmanagerAPIStatus describes the Alertmanager instance overall health
|
||||
|
||||
Reference in New Issue
Block a user