mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
Merge pull request #8626 from roidelapluie/go-to-am-api-v2
Switch to alertmanager api v2
This commit is contained in:
commit
31a518faab
|
@ -117,7 +117,7 @@ var (
|
||||||
DefaultAlertmanagerConfig = AlertmanagerConfig{
|
DefaultAlertmanagerConfig = AlertmanagerConfig{
|
||||||
Scheme: "http",
|
Scheme: "http",
|
||||||
Timeout: model.Duration(10 * time.Second),
|
Timeout: model.Duration(10 * time.Second),
|
||||||
APIVersion: AlertmanagerAPIVersionV1,
|
APIVersion: AlertmanagerAPIVersionV2,
|
||||||
HTTPClientConfig: config.DefaultHTTPClientConfig,
|
HTTPClientConfig: config.DefaultHTTPClientConfig,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -785,7 +785,7 @@ var expectedConf = &Config{
|
||||||
{
|
{
|
||||||
Scheme: "https",
|
Scheme: "https",
|
||||||
Timeout: model.Duration(10 * time.Second),
|
Timeout: model.Duration(10 * time.Second),
|
||||||
APIVersion: AlertmanagerAPIVersionV1,
|
APIVersion: AlertmanagerAPIVersionV2,
|
||||||
HTTPClientConfig: config.DefaultHTTPClientConfig,
|
HTTPClientConfig: config.DefaultHTTPClientConfig,
|
||||||
ServiceDiscoveryConfigs: discovery.Configs{
|
ServiceDiscoveryConfigs: discovery.Configs{
|
||||||
discovery.StaticConfig{
|
discovery.StaticConfig{
|
||||||
|
|
|
@ -1755,7 +1755,7 @@ through the `__alerts_path__` label.
|
||||||
[ timeout: <duration> | default = 10s ]
|
[ timeout: <duration> | default = 10s ]
|
||||||
|
|
||||||
# The api version of Alertmanager.
|
# The api version of Alertmanager.
|
||||||
[ api_version: <string> | default = v1 ]
|
[ api_version: <string> | default = v2 ]
|
||||||
|
|
||||||
# Prefix for the HTTP path alerts are pushed to.
|
# Prefix for the HTTP path alerts are pushed to.
|
||||||
[ path_prefix: <path> | default = / ]
|
[ path_prefix: <path> | default = / ]
|
||||||
|
|
|
@ -454,7 +454,7 @@ func TestReload(t *testing.T) {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
out: "http://alertmanager:9093/api/v1/alerts",
|
out: "http://alertmanager:9093/api/v2/alerts",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -504,7 +504,7 @@ func TestDroppedAlertmanagers(t *testing.T) {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
out: "http://alertmanager:9093/api/v1/alerts",
|
out: "http://alertmanager:9093/api/v2/alerts",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue