diff --git a/pipeline/alert.go b/pipeline/alert.go index 48dffaf60..ca21ea504 100644 --- a/pipeline/alert.go +++ b/pipeline/alert.go @@ -2248,7 +2248,7 @@ type TeamsHandler struct { // Teams channel webhook URL to post messages. // If empty uses the URL from the configuration. - ChannelURL string `json:"channel-url"` + ChannelURL string `json:"channel_url"` } // Send the alert to ServiceNow. diff --git a/server/server_test.go b/server/server_test.go index da1fcec51..aa5b751e9 100644 --- a/server/server_test.go +++ b/server/server_test.go @@ -9457,7 +9457,7 @@ func TestServer_ListServiceTests(t *testing.T) { Link: client.Link{Relation: client.Self, Href: "/kapacitor/v1/service-tests/teams"}, Name: "teams", Options: client.ServiceTestOptions{ - "channel-url": "", + "channel_url": "", "alert_topic": "test kapacitor alert topic", "alert_id": "foo/bar/bat", "message": "test teams message", diff --git a/services/teams/service.go b/services/teams/service.go index d766b9507..eac085341 100644 --- a/services/teams/service.go +++ b/services/teams/service.go @@ -70,7 +70,7 @@ func (s *Service) StateChangesOnly() bool { } type testOptions struct { - ChannelURL string `json:"channel-url"` + ChannelURL string `json:"channel_url"` AlertTopic string `json:"alert_topic"` AlertID string `json:"alert_id"` Message string `json:"message"`