Closed nikkictl closed 5 years ago
It appears is_incident
filters resolution events, so if that is the preferred terminology, perhaps we should remove the is_resolution
key from event.go
?
IsResolution()
method is used in a couple of places (e.g. https://github.com/sensu/sensu-go/blob/15b4e2e48a3ef7804938875b4503e9435a6feae5/backend/eventd/silenced.go#L75) and it's not the same as !IsIncident()
so I feel like it's still relevant to have that. That being said, maybe it could be exposed as a built-in filter if required.
is_resolution
logic exists inevent.go
https://github.com/sensu/sensu-go/blob/e3421f7ed050bfb3310f83a28aed5b9d85b4be64/api/core/v2/event.go#L113 https://github.com/sensu/sensu-go/blob/e3421f7ed050bfb3310f83a28aed5b9d85b4be64/api/core/v2/event.go#L84-L96 but is not implemented infilter.go
https://github.com/sensu/sensu-go/blob/95acb053dcc16a9eaa3d9faaacad8df707cccc74/backend/pipelined/filter.go#L101-L128We should add the follow case to
filter.go
so users can invoke the built-inis_resolution
filter. We should also document this filter.