Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

default to alertmanager v2 api #113

Merged
merged 1 commit into from
Jul 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pkg/alert/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func DefaultAlertmanagerConfig() AlertmanagerConfig {
FileSDConfigs: []clientconfig.HTTPFileSDConfig{},
},
Timeout: model.Duration(time.Second * 10),
APIVersion: APIv1,
APIVersion: APIv2,
}
}

Expand Down Expand Up @@ -136,7 +136,7 @@ func BuildAlertmanagerConfig(address string, timeout time.Duration) (Alertmanage
StaticAddresses: []string{host},
},
Timeout: model.Duration(timeout),
APIVersion: APIv1,
APIVersion: APIv2,
}, nil
}

Expand Down
14 changes: 7 additions & 7 deletions pkg/alert/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func TestBuildAlertmanagerConfiguration(t *testing.T) {
StaticAddresses: []string{"localhost:9093"},
Scheme: "http",
},
APIVersion: APIv1,
APIVersion: APIv2,
},
},
{
Expand All @@ -68,7 +68,7 @@ func TestBuildAlertmanagerConfiguration(t *testing.T) {
StaticAddresses: []string{"am.example.com"},
Scheme: "https",
},
APIVersion: APIv1,
APIVersion: APIv2,
},
},
{
Expand All @@ -78,7 +78,7 @@ func TestBuildAlertmanagerConfiguration(t *testing.T) {
StaticAddresses: []string{"dns+localhost:9093"},
Scheme: "http",
},
APIVersion: APIv1,
APIVersion: APIv2,
},
},
{
Expand All @@ -88,7 +88,7 @@ func TestBuildAlertmanagerConfiguration(t *testing.T) {
StaticAddresses: []string{"dnssrv+localhost"},
Scheme: "http",
},
APIVersion: APIv1,
APIVersion: APIv2,
},
},
{
Expand All @@ -98,7 +98,7 @@ func TestBuildAlertmanagerConfiguration(t *testing.T) {
StaticAddresses: []string{"localhost"},
Scheme: "ssh+http",
},
APIVersion: APIv1,
APIVersion: APIv2,
},
},
{
Expand All @@ -109,7 +109,7 @@ func TestBuildAlertmanagerConfiguration(t *testing.T) {
Scheme: "https",
PathPrefix: "/path/prefix/",
},
APIVersion: APIv1,
APIVersion: APIv2,
},
},
{
Expand All @@ -125,7 +125,7 @@ func TestBuildAlertmanagerConfiguration(t *testing.T) {
StaticAddresses: []string{"localhost:9093"},
Scheme: "http",
},
APIVersion: APIv1,
APIVersion: APIv2,
},
},
{
Expand Down
Loading