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

Infra/Logs rule types > Add alertDetailsUrl parameter to redirect user to the Alerts page filtered for that alert instance #156534

Closed
Tracked by #157284
maryam-saeidi opened this issue May 3, 2023 · 5 comments · Fixed by #157987
Assignees
Labels
Team: Actionable Observability - DEPRECATED For Observability Alerting and SLOs use "Team:obs-ux-management", for AIops "Team:obs-knowledge" v8.9.0

Comments

@maryam-saeidi
Copy link
Member

maryam-saeidi commented May 3, 2023

📝 Summary

At the moment, we only have alertDetailsUrl action variable for APM Latency:

Since it will take time to have alert details page for all the rule types, one idea is to add this context variable to all observability rules and then redirect the user to the Alerts page filtered for that specific alert instance, something like the following screenshot using URL query parameter:

image

In this case, we need to:

  • Use a unique identifier for each alert to filter based on that
  • Make sure that the time range covers the time that the alert was firing (To avoid not showing any alert if it was recovered)

This can be used to improve the user experience related to this request: #156498

✅ Acceptance Criteria

  • Add alertDetailsUrl context variable for all the observability infra rule types

🛠️ Related tickets/PRs

@maryam-saeidi maryam-saeidi added Team: Actionable Observability - DEPRECATED For Observability Alerting and SLOs use "Team:obs-ux-management", for AIops "Team:obs-knowledge" v8.9.0 labels May 3, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/actionable-observability (Team: Actionable Observability)

@maryam-saeidi
Copy link
Member Author

@katrin-freihofner What should be the description of alertDetailsUrl context variable? (Same for viewInAppUrl)
The current one does not match the other two, and I want to know if it is clear enough.

image

@maryam-saeidi maryam-saeidi changed the title Add alertDetailsUrl parameter to all alerts to redirect user to the Alerts page filtered for that alert instance Add alertDetailsUrl parameter to infra alerts to redirect user to the Alerts page filtered for that alert instance May 17, 2023
@maryam-saeidi
Copy link
Member Author

Based on @XavierM feedback: we should use kibana.alert.url instead of context.alertDetailsUrl

@katrin-freihofner
Copy link
Contributor

Okay, so the context.alertDetailsUrl field will be removed?

@maryam-saeidi
Copy link
Member Author

Yes, that's the idea

@maryam-saeidi maryam-saeidi changed the title Add alertDetailsUrl parameter to infra alerts to redirect user to the Alerts page filtered for that alert instance Add alertDetailsUrl parameter to infra rules to redirect user to the Alerts page filtered for that alert instance May 23, 2023
maryam-saeidi added a commit that referenced this issue May 26, 2023
Closes #156534

## Summary

This PR adds the alertDetailsUrl to the infra rules. The value of this
variable is a link to the `observability > alerts` page filtered for
this instance of alert.


![image](https://github.com/elastic/kibana/assets/12370520/409bea90-5d2b-4e60-ae4c-61223cccd41a)

Here is an example of this action variable:

|alertDetailsUrl as action variable|Result of action|
|---|---|

|![image](https://github.com/elastic/kibana/assets/12370520/4d920710-357a-4557-b871-36f0f8ecf0be)|![image](https://github.com/elastic/kibana/assets/12370520/4f800c6d-f15f-481e-b7fc-4f85aa1085a7)|

**Note**
- I will change this field to `kibana.alert.url` in another
[ticket](#158359)

## 🧪 How to test
- Ensure that `server.publicBaseUrl` is configured in kibana.dev.yml
- Create a metric threshold/inventory/logs rule and use the
`context.alertDetailsUrl` in action for this rule
- After an alert is triggered, open the link provided by alertDetailsUrl
and make sure that the alert is filtered correctly
- Check the time range, it should be set for 5 mins before the alert
start time

---------

Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Carlos Crespo <[email protected]>
@maryam-saeidi maryam-saeidi changed the title Add alertDetailsUrl parameter to infra rules to redirect user to the Alerts page filtered for that alert instance Infra/Logs rule types > Add alertDetailsUrl parameter to redirect user to the Alerts page filtered for that alert instance May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team: Actionable Observability - DEPRECATED For Observability Alerting and SLOs use "Team:obs-ux-management", for AIops "Team:obs-knowledge" v8.9.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants