Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Commit

Permalink
#127 only handle problem events that come from dynatrace (ignore even…
Browse files Browse the repository at this point in the history
…ts that the service sent out itself)
  • Loading branch information
bacherfl committed Apr 24, 2020
1 parent 48e797c commit c1baceb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
4 changes: 2 additions & 2 deletions pkg/event_handler/problem_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ const eventbroker = "EVENTBROKER"

func (eh ProblemEventHandler) HandleEvent() error {

if eh.Event.Source() != "https://github.com/keptn/keptn/api" {
eh.Logger.Debug("Will not handle problem event that did not go through the API (event source = " + eh.Event.Source() + ")")
if eh.Event.Source() != "dynatrace" {
eh.Logger.Debug("Will not handle problem event that did not come from a Dynatrace Problem Notification (event source = " + eh.Event.Source() + ")")
return nil
}
var shkeptncontext string
Expand Down
13 changes: 0 additions & 13 deletions pkg/lib/dynatrace_api_models.go
Original file line number Diff line number Diff line change
Expand Up @@ -506,19 +506,6 @@ func CreateKeptnAlertingProfile() *AlertingProfile {
},
},
ManagementZoneID: nil,
EventTypeFilters: []*AlertingProfileEventTypeFilter{
{
CustomEventFilter: CustomEventFilter{
CustomTitleFilter: CustomTitleFilter{
Enabled: true,
Value: "Keptn",
Operator: "CONTAINS",
Negate: false,
CaseInsensitive: true,
},
},
},
},
}
}

Expand Down

0 comments on commit c1baceb

Please sign in to comment.