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

Custom Threshold Rule - ViewInAppUrl does not honour Kibana Space #201333

Closed
morashwan opened this issue Nov 22, 2024 · 2 comments · Fixed by #201793
Closed

Custom Threshold Rule - ViewInAppUrl does not honour Kibana Space #201333

morashwan opened this issue Nov 22, 2024 · 2 comments · Fixed by #201793
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Team:obs-ux-management Observability Management User Experience Team

Comments

@morashwan
Copy link

Kibana version:
8.15.4, 8.16

Elasticsearch version:
8.15.4, 8.16

Describe the bug:
The Custom Threshold Rule provides in the action variables multiple urls to access the results and alerts. The viewInAppUrl does not add the Kibana space to the url -> User is routed to Default space, which limit any multi-space Kibana to use this feature. Other urls like alertDetailsUrl are behaving like expected with Kibana space in the url. The json below shows (skipped the irrelevant fields) the url behavior

"alertId": "c631205d-192d-471b-97f3-7012099cdac4",
"spaceId": "a0355",
"context": {
    "alertDetailsUrl": "https: //<redacted>:9243/s/a0355/app/observability/alerts/3929e860-236d-4e5c-a63b-aa693e3ac6d3",
    "viewInAppUrl": "https: //<redacted>t:9243/app/r?l=LOGS_EXPLORER_LOCATOR&v=8.15.4&lz=<redacted>",
}
}

Steps to reproduce:

  1. Create a new Kibana Space
  2. Create Custom Threshold Rule in the new space
  3. Create a rule with email action and output the {{context.viewInAppUrl}}
  4. Url routes to Default space instead of the space created in

Expected behavior:
Url routes to the Space where the Rule is created and not Default Space

Screenshots (if relevant):

Errors in browser console (if relevant):

Provide logs and/or server output (if relevant):

Any additional context:

@morashwan morashwan added bug Fixes for quality problems that affect the customer experience Team:obs-ux-management Observability Management User Experience Team labels Nov 22, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-management-team (Team:obs-ux-management)

@maryam-saeidi
Copy link
Member

I checked this issue briefly, and it seems the logs explorer locator (which uses the discover locator behind the scenes) does not have the option to specify spaceId. I am checking with @elastic/kibana-data-discovery team to see how to add that option.

It is worth mentioning that spaceId is needed to be specified on the server side during rule execution. We use the same locator on the alert details page, and it works as expected (meaning it will stay in the same space when clicking on the "open in Discover" link)

@maryam-saeidi maryam-saeidi self-assigned this Nov 29, 2024
@Dosant Dosant closed this as completed in f1f3a4f Dec 11, 2024
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Dec 11, 2024
…c#201793)

## Summary

Close elastic#201378
Fix elastic#201333

- [Share] Allow to pass `spaceId` to `getRedirectUrl` to build a URL
with a specific `spaceId`
- Fix Custom Threshold Rule ViewInAppUrl does not honor Space

---------

Co-authored-by: Maryam Saeidi <maryam.saeidi@elastic.co>
(cherry picked from commit f1f3a4f)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Dec 11, 2024
…c#201793)

## Summary

Close elastic#201378
Fix elastic#201333

- [Share] Allow to pass `spaceId` to `getRedirectUrl` to build a URL
with a specific `spaceId`
- Fix Custom Threshold Rule ViewInAppUrl does not honor Space

---------

Co-authored-by: Maryam Saeidi <maryam.saeidi@elastic.co>
(cherry picked from commit f1f3a4f)
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this issue Dec 12, 2024
…c#201793)

## Summary

Close elastic#201378
Fix elastic#201333

- [Share] Allow to pass `spaceId` to `getRedirectUrl` to build a URL
with a specific `spaceId`
- Fix Custom Threshold Rule ViewInAppUrl does not honor Space

---------

Co-authored-by: Maryam Saeidi <maryam.saeidi@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Team:obs-ux-management Observability Management User Experience Team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants