mirror of
https://github.com/prymitive/karma
synced 2026-05-05 03:16:51 +00:00
committed by
Łukasz Mierzwa
parent
0de58da467
commit
9222133df8
@@ -8,6 +8,11 @@
|
||||
for multi-grid, when multi-grid is configured to `Automatic selection`
|
||||
in the UI or when `ui:multiGridLabel` config section is set to `@auto`.
|
||||
|
||||
### Changed
|
||||
|
||||
- karma will no longer fail to start if config file contains multiple alertmanager
|
||||
instances with different name but identical URI #3024.
|
||||
|
||||
## v0.83
|
||||
|
||||
### Added
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
# Raises an error if we have 2 instances with the same URI
|
||||
karma.bin-should-fail --config.file karma.yaml
|
||||
! stdout .
|
||||
cmp stderr stderr.txt
|
||||
|
||||
-- stderr.txt --
|
||||
level=info msg="Reading configuration file" path=karma.yaml
|
||||
level=info msg="Version: dev"
|
||||
level=info msg="Configured Alertmanager source" name=am1 proxy=false readonly=false uri=https://127.0.0.1:9093
|
||||
level=error msg="Execution failed" error="failed to register Alertmanager 'am2' with URI 'https://127.0.0.1:9093': alertmanager upstream 'am1' already collects from 'https://127.0.0.1:9093'"
|
||||
-- karma.yaml --
|
||||
alertmanager:
|
||||
servers:
|
||||
- name: am1
|
||||
uri: https://127.0.0.1:9093
|
||||
- name: am2
|
||||
uri: https://127.0.0.1:9093
|
||||
@@ -75,11 +75,6 @@ func RegisterAlertmanager(am *Alertmanager) error {
|
||||
return fmt.Errorf("alertmanager upstream '%s' already exist", am.Name)
|
||||
}
|
||||
|
||||
for _, existingAM := range upstreams {
|
||||
if existingAM.URI == am.URI {
|
||||
return fmt.Errorf("alertmanager upstream '%s' already collects from '%s'", existingAM.Name, uri.SanitizeURI(existingAM.URI))
|
||||
}
|
||||
}
|
||||
upstreams[am.Name] = am
|
||||
// am.Name, uri.SanitizeURI(am.URI), am.ProxyRequests, am.ReadOnly
|
||||
log.Info().
|
||||
|
||||
Reference in New Issue
Block a user