mirror of
https://github.com/prymitive/karma
synced 2026-05-05 03:16:51 +00:00
feat(config): add cluster option to alertmanager instances
This commit is contained in:
committed by
Łukasz Mierzwa
parent
ca25eb9fbe
commit
e52cc91964
@@ -358,6 +358,7 @@ func (config *configSchema) LogValues() {
|
||||
servers := []AlertmanagerConfig{}
|
||||
for _, s := range cfg.Alertmanager.Servers {
|
||||
server := AlertmanagerConfig{
|
||||
Cluster: s.Cluster,
|
||||
Name: s.Name,
|
||||
URI: uri.SanitizeURI(s.URI),
|
||||
ExternalURI: uri.SanitizeURI(s.ExternalURI),
|
||||
|
||||
@@ -33,7 +33,8 @@ authorization:
|
||||
alertmanager:
|
||||
interval: 1s
|
||||
servers:
|
||||
- name: default
|
||||
- cluster: ""
|
||||
name: default
|
||||
uri: http://localhost
|
||||
external_uri: http://example.com
|
||||
timeout: 40s
|
||||
|
||||
@@ -10,6 +10,7 @@ type AlertmanagerCORS struct {
|
||||
}
|
||||
|
||||
type AlertmanagerConfig struct {
|
||||
Cluster string
|
||||
Name string
|
||||
URI string
|
||||
ExternalURI string `yaml:"external_uri" koanf:"external_uri"`
|
||||
@@ -70,6 +71,7 @@ type configSchema struct {
|
||||
Alertmanager struct {
|
||||
Interval time.Duration
|
||||
Servers []AlertmanagerConfig
|
||||
Cluster string `yaml:"-" koanf:"cluster"`
|
||||
Name string `yaml:"-" koanf:"name"`
|
||||
Timeout time.Duration `yaml:"-" koanf:"timeout"`
|
||||
URI string `yaml:"-" koanf:"uri"`
|
||||
|
||||
Reference in New Issue
Block a user