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

How to handle stateless incidents #206

Open
hmpf opened this issue Nov 4, 2020 · 7 comments
Open

How to handle stateless incidents #206

hmpf opened this issue Nov 4, 2020 · 7 comments
Assignees
Labels
API v2 Ideas for API v2, backwards incompatible OK discussion Requires developer feedback/discussion before implementation frontend Has/needs companion issue in frontend

Comments

@hmpf
Copy link
Contributor

hmpf commented Nov 4, 2020

Currently, if an incident is stateless, whether it is open or closed is irrelevant. It cannot be closed. Its end_time will forever be None/null.

When filtering on open/closed, these are hidden, because that filter only checks for end_time being set/not None. When not using an open/close filter ("both" in frontend), these are visible. There exists a filter to find/exclude stateless incidents, but this is not used or visible by the frontend.

Also, it doesn't make sense to have a "start"-event on these. Should they have their own stateless-only event, or no events? Does it make sense to ack (an event) such an incident?

Example in prod: #1102, start time 11/4/2020, 10:43:26 AM.

@hmpf hmpf added discussion Requires developer feedback/discussion before implementation frontend Has/needs companion issue in frontend labels Nov 4, 2020
@lunkwill42
Copy link
Member

lunkwill42 commented Nov 4, 2020

  1. I think there should be a separate event type for stateless incidents. Instead of creating a STA event, it should perhaps be something like MSG, which indicates this was a one-off message - i.e. an incident with no time extent. Maybe INS for "Instant"?

  2. Acks are for suppressing open incidents, so I guess they make no sense for stateless incidents. But you could still use them to add some sort of comment to a stateless incident, if you so wished.

Since we do not currently have a filter to turn on/off stateless incidents, it's okay to show them when the "open/closed" filter is chosen. However, the red "Closed" badge makes no sense on these incidents - and neither does the green "Open" badge. The badge should either be entirely removed, or perhaps replaced with "Stateless" or "Instant".

@hmpf
Copy link
Contributor Author

hmpf commented Nov 4, 2020

I just pushed an update to the command create_fake_incident to allow it to create stateless incidents. I had none in my test database.

@hmpf
Copy link
Contributor Author

hmpf commented Nov 4, 2020

I think when we have settled on an event-type, we should retype the existing start events on stateless incidents.

@hmpf hmpf added this to the Blue sky milestone Nov 4, 2020
@hmpf
Copy link
Contributor Author

hmpf commented Nov 4, 2020

Since we do not currently have a filter to turn on/off stateless incidents, it's okay to show them when the "open/closed" filter is chosen.

Currently they are not, only when neither is asked for: "Both" in the frontend. Maybe we should have a four way toggle: "Open", "Closed", "Stateless", "All"?

See Uninett/Argus-frontend#356

@lunkwill42
Copy link
Member

Currently they are not, only when neither is asked for: "Both" in the frontend. Maybe we should have a four way toggle: "Open", "Closed", "Stateless", "All"?

Yes - since stateless can neither be open nor closed...

@hmpf hmpf modified the milestones: Blue sky, Version 1.1 Nov 6, 2020
@hmpf hmpf removed this from the Version 1.1 milestone Feb 10, 2021
@hmpf hmpf added the API v2 Ideas for API v2, backwards incompatible OK label Sep 7, 2021
@hmpf
Copy link
Contributor Author

hmpf commented Feb 28, 2022

In the meantime I will see if adding "stateful=True" to the fallback filter in production will improve things.

@hmpf
Copy link
Contributor Author

hmpf commented Mar 3, 2022

We need to figure out what the filterset does when given more than one flag: OR or AND. We want AND most of the time.

See #354

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API v2 Ideas for API v2, backwards incompatible OK discussion Requires developer feedback/discussion before implementation frontend Has/needs companion issue in frontend
Projects
None yet
Development

No branches or pull requests

2 participants