Replies: 4 comments 10 replies
-
I think the real problem is caused by having a single mechanism make filters both for the incident list and the notification events. Adding frontend-support for filtering on event-types won't be visible in the incidents list. If we split out sigh notification filters to a separate page we can have an events-list that shows the effects of notification-filters, including event-type. We could change the filter for event types to tristates (optional bool).
The above filter would never send notifications for change-events (so far: changing ticket-url) or ack-events regardless of the incident list. The above filter would be ignored by the incidents-list. What would having a filter Regardless, code-changes are needed to support notification of CLOSE-events that are on acked incidents. |
Beta Was this translation helpful? Give feedback.
-
The original problemThe original problem (which #293 was supposed to be a short-term workaround for) was this:
However, filters (currently) only filter on incident attributes, not on event attributes (I.e. i believe they can be made to filter on event attributes, but this is not available from the UI). Since notifications are based on events, every event that occurs on a matching incident is sent as a notification. This includes things like the event for someone ACKing an incident, or the CHANGE event that occurs when someone adds a ticket URL to the matching incident. These notifications are basically spam for the CNaaS team. Since changing how notification filters work is a "big task", we opted to do a short-term workaround by adding a fallback filter to the config file, which could filter away certain types of events from all notifications. However, I think #293 was based on some orally communicated design spec, not a written one (there is no associated issue describing the requested feature), and therefore resulted in some misunderstandings. Incident filter expressions vs event filter expressionsWhat we need is some way to specify an event type match expression (#466 and #699 are about this). However, as @hmpf states, filter expressions matching on event attributes have no effect when it comes to filtering the incident list in the UI. Their only use is for filtering during notification. In other words, adding UI widgets to enable the user to filter for event attributes on the incidents list page makes no sense - this would likely only confuse the user, since it would appear to have no effect on the incidents list. What I previously remember discussing (and it doesn't look like we wrote it down anywhere, sadly) was perhaps adding some UI widget to do event-specific filtering from the notification profile page instead. Something like "subscribe to filter |
Beta Was this translation helpful? Give feedback.
-
"None" also means "missing from Filter.filter". API serialization has all keys.
The question arises: what about:
|
Beta Was this translation helpful? Give feedback.
-
The first thing is already possible in the backend: |
Beta Was this translation helpful? Give feedback.
-
The default for filtering incidents is: if no filter, show me everything. Incidents are opt-out.
The default for filtering notifications is: if no filter, notify about nothing. Notifications are opt-in, there's currently no way to say "I want everything, gimme the firehose".
What does it really mean when acks are filtered out
An ack is two things: a state of the incident, and a specific type of event.
incident.acked
, and filtering on "acked".event.type
is set toEvent.Type.ACKED
. The filtering is a bit broken but happens inFilterWrapper.event_fits()
. If the filter has event_type set to one and only one of theEvent.Type
s type, the event fits. We want to support multiple types.In the frontend, we can hide or show only acked incidents by toggling
acked
. It is currently not possible to hide acking-events, and I am not sure whether that makes sense at all for the incident list, since it shows the state of incidents, not events. We cannot really show with a live update of the incidents list the effect of hiding or choosing a specific event.So what happens to notifications if we filter away acked incidents, but want, say, events of type
Event.Type.CLOSE
even for incidents that are acked?The incident-state of "open" is the same as the event-types "INCIDENT_START", "INCIDENT_REOPEN" while the incident-state of "closed" is the same as the event-types "INCIDENT_END" and "CLOSE". An acked incident can coexist with any of these.
Beta Was this translation helpful? Give feedback.
All reactions