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

Ability to fetch alert state / alert instance state #48442

Closed
mikecote opened this issue Oct 16, 2019 · 7 comments · Fixed by #56625
Closed

Ability to fetch alert state / alert instance state #48442

mikecote opened this issue Oct 16, 2019 · 7 comments · Fixed by #56625
Assignees
Labels
Feature:Alerting Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) v7.7.0

Comments

@mikecote
Copy link
Contributor

No description provided.

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-stack-services (Team:Stack Services)

@chrisronline
Copy link
Contributor

Stack Monitoring Use Case

We have alerts that we want to show in the UI - we show the user if the alert is currently firing, or if a previously firing alert has been resolved.

Screen Shot 2019-10-16 at 2 09 52 PM

In our watcher implementation, we write this alerting state to an index (.monitoring-alerts-*) which we read from and display in the UI.

As we migrate to Kibana alerting, it'd be nice to avoid needing this extra index, especially since all the state we need should be available in the alert state. If we had a way to query this, I'd save us needing an extra index.

The one gotcha here would be security - currently, users of Stack Monitoring do not have access to query watcher apis directly (or watcher-based indices) so we'd need to ensure the security requirements are clear for users.

@bmcconaghy bmcconaghy added Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) and removed Team:Stack Services labels Dec 12, 2019
@chrisronline
Copy link
Contributor

Any update on when/if this will be supported?

@mikecote
Copy link
Contributor Author

@chrisronline so far this is still planned for the mid-term of the project. After re-reading your use case, do you think the following would solve your issue (#51099)? We're aiming to have that in 7.7 and would allow you to query / show if an alert is currently firing.

@chrisronline
Copy link
Contributor

@mikecote I'm going to revisit the exact details of the need soon, but I last left this effort with code that just queries against .kibana_task_manager* directly. Once I revisit, I'll update this ticket with what exact information we need from there.

@chrisronline
Copy link
Contributor

chrisronline commented Jan 8, 2020

@mikecote So, for our use case, we want to be able to add arbitrary "metadata" to the state of an alert. Then, provide a way to fetch status (like firing/not firing) in addition to this "metadata".

Right now, I'm just storing this as state that is returned from the alert itself. Then, I'm querying the task manager directly and unserializing the state.

To be more specific:

This represents what is stored in the state of our alert and we pull it as part of our server-side query to see which alerts need to show up in the UI, which uses parts to figure out what to show the user.

@mikecote
Copy link
Contributor Author

@chrisronline thanks! There's a good chance we'll this API in 7.7 as we'll need something similar to pull alert instances in our UIs.

@kobelb kobelb added the needs-team Issues missing a team label label Jan 31, 2022
@botelastic botelastic bot removed the needs-team Issues missing a team label label Jan 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Alerting Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) v7.7.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants