-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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] Show all alerts in Infra views (Host + Containers) for consistency with entity inventory #202188
Conversation
); | ||
expect(screen.queryByTestId('inventoryAlertsBadgeLink')?.textContent).toEqual('5'); | ||
}); | ||
it('render alerts badge for a service entity with multiple identity fields', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing this test as we don't have that functionality anymore
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
CC @roshan-elastic in case you want to see the screenshots |
THANK YOU! Having just the PRs I need to see without needing to go further than here saves me SO much time ❤️ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just a nit
...lity_solution/infra/public/pages/metrics/hosts/components/tabs/alerts/alerts_tab_content.tsx
Outdated
Show resolved
Hide resolved
…cs/hosts/components/tabs/alerts/alerts_tab_content.tsx Co-authored-by: Cauê Marcondes <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -63,7 +69,7 @@ export const AlertsTabContent = () => { | |||
<LinkToAlertsPage | |||
dateRange={searchCriteria.dateRange} | |||
data-test-subj="infraHostAlertsTabAlertsShowAllButton" | |||
kuery={`${ALERT_RULE_PRODUCER}: ${INFRA_ALERT_FEATURE_ID}`} | |||
kuery={`${hostsWithAlertsKuery}`} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we sure we want to filter by this?
The query's scalability has changed, and instead of showing all alerts across hosts, we're now only displaying alerts for specific hosts. This could limit the visibility we might need.
Any thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well, as the previous query would only show alerts that were created inside infra, now we are filtering by all the hosts that have more than 1 alert. This maintains the alert count we are showing everywhere
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just nits ⬇️
x-pack/plugins/observability_solution/infra/common/constants.ts
Outdated
Show resolved
Hide resolved
x-pack/plugins/observability_solution/infra/public/components/shared/alerts/constants.ts
Outdated
Show resolved
Hide resolved
x-pack/plugins/observability_solution/inventory/public/components/alerts_badge/alerts_badge.tsx
Show resolved
Hide resolved
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]Async chunks
Page load bundle
History
cc @rmyz |
Starting backport for target branches: 8.x |
…tency with entity inventory (elastic#202188) ## Summary Closes elastic#201567 Fixes elastic#181580 and elastic#201528 This PR ensures that Infra views display all alerts, regardless of index pattern. It provides consistent alert visibility across services. - **Alert counts per host in the Hosts List now shows all host alerts** - **Alert counts in alerting tab in Hosts List now shows all host alerts** - **Hosts Views now shows all host alerts** - **Container Views now shows all container alerts** - **Alert counts shown in Hosts Lists and Host Views now are consistent with alerting app when filtered by host** - **Clicking through alerts in host/container views now filters by just the entity ID** - **Clicking `Show all` in `Hosts` now goes to Alerts app with all hosts that have alerts in the filter** - **Clicking an Alert in Entity Inventory now searches by just the entity ID** ## Screenshots Screen|Before|After -|-|- Entity inventory (no changes here, just showing the alert count for next screens)|<img width="1276" alt="image" src="https://github.com/user-attachments/assets/e6054957-b9d8-4d19-8ce3-b101f60099a2">|<img width="772" alt="image" src="https://github.com/user-attachments/assets/2b64fb4d-ff60-4c6b-8e15-3ccb5ae6621b"> Host detail view|<img width="662" alt="image" src="https://github.com/user-attachments/assets/0dd405bc-888a-4fd0-9412-6016e8ae3795">|<img width="775" alt="image" src="https://github.com/user-attachments/assets/bf694b1d-b7bb-4cc8-abd1-bebb2070d11c"> Host List view|<img width="536" alt="image" src="https://github.com/user-attachments/assets/a9c7ae89-8549-49d0-aeb3-3dc28dd3f713"><img width="894" alt="image" src="https://github.com/user-attachments/assets/38433bfb-66b0-4c08-824a-ccf46ad93e50">|<img width="582" alt="image" src="https://github.com/user-attachments/assets/7addf149-9f12-45a3-b443-9cd069edc4a9"><img width="731" alt="image" src="https://github.com/user-attachments/assets/51e80e6c-504b-40b0-80b7-a9a58a6ad153"> Container detail view|<img width="676" alt="image" src="https://github.com/user-attachments/assets/851cafec-d580-4184-a7a1-7b87620ea1b4">|<img width="698" alt="image" src="https://github.com/user-attachments/assets/aebdd4f5-26f1-4b74-8cf4-37dc74aad112"> Click `Show all` in Host List|<img width="696" alt="image" src="https://github.com/user-attachments/assets/0557f9f8-aee3-4898-be17-372f3522f160">|<img width="1096" alt="image" src="https://github.com/user-attachments/assets/c5ace835-a56b-45cb-95c7-fa978d7840f5"> Click `Show all` in Host/Container detail view|<img width="712" alt="image" src="https://github.com/user-attachments/assets/eb04c059-aff0-48f4-90fb-73c08943cb57">|<img width="748" alt="image" src="https://github.com/user-attachments/assets/189f686d-5931-4f42-bf14-ac9f1ae987e4"> Click alert in Entity Inventory|<img width="677" alt="image" src="https://github.com/user-attachments/assets/e99f70a1-c217-4225-acf4-25285fff8282">|<img width="637" alt="image" src="https://github.com/user-attachments/assets/9aa77aa4-7a77-45ac-8cf4-95b5203d0f5a"> --------- Co-authored-by: Cauê Marcondes <[email protected]> (cherry picked from commit a882b2c)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…consistency with entity inventory (#202188) (#202336) # Backport This will backport the following commits from `main` to `8.x`: - [[Infra] Show all alerts in Infra views (Host + Containers) for consistency with entity inventory (#202188)](#202188) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Sergi Romeu","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-29T15:45:58Z","message":"[Infra] Show all alerts in Infra views (Host + Containers) for consistency with entity inventory (#202188)\n\n## Summary\n\nCloses https://github.com/elastic/kibana/issues/201567\nFixes #181580 and #201528\n\nThis PR ensures that Infra views display all alerts, regardless of index\npattern.\nIt provides consistent alert visibility across services.\n- **Alert counts per host in the Hosts List now shows all host alerts**\n- **Alert counts in alerting tab in Hosts List now shows all host\nalerts**\n- **Hosts Views now shows all host alerts**\n- **Container Views now shows all container alerts**\n- **Alert counts shown in Hosts Lists and Host Views now are consistent\nwith alerting app when filtered by host**\n- **Clicking through alerts in host/container views now filters by just\nthe entity ID**\n- **Clicking `Show all` in `Hosts` now goes to Alerts app with all hosts\nthat have alerts in the filter**\n- **Clicking an Alert in Entity Inventory now searches by just the\nentity ID**\n\n## Screenshots\nScreen|Before|After\n-|-|-\nEntity inventory (no changes here, just showing the alert count for next\nscreens)|<img width=\"1276\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/e6054957-b9d8-4d19-8ce3-b101f60099a2\">|<img\nwidth=\"772\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/2b64fb4d-ff60-4c6b-8e15-3ccb5ae6621b\">\nHost detail view|<img width=\"662\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/0dd405bc-888a-4fd0-9412-6016e8ae3795\">|<img\nwidth=\"775\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/bf694b1d-b7bb-4cc8-abd1-bebb2070d11c\">\nHost List view|<img width=\"536\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/a9c7ae89-8549-49d0-aeb3-3dc28dd3f713\"><img\nwidth=\"894\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/38433bfb-66b0-4c08-824a-ccf46ad93e50\">|<img\nwidth=\"582\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/7addf149-9f12-45a3-b443-9cd069edc4a9\"><img\nwidth=\"731\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/51e80e6c-504b-40b0-80b7-a9a58a6ad153\">\nContainer detail view|<img width=\"676\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/851cafec-d580-4184-a7a1-7b87620ea1b4\">|<img\nwidth=\"698\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/aebdd4f5-26f1-4b74-8cf4-37dc74aad112\">\nClick `Show all` in Host List|<img width=\"696\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/0557f9f8-aee3-4898-be17-372f3522f160\">|<img\nwidth=\"1096\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/c5ace835-a56b-45cb-95c7-fa978d7840f5\">\nClick `Show all` in Host/Container detail view|<img width=\"712\"\nalt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/eb04c059-aff0-48f4-90fb-73c08943cb57\">|<img\nwidth=\"748\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/189f686d-5931-4f42-bf14-ac9f1ae987e4\">\nClick alert in Entity Inventory|<img width=\"677\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/e99f70a1-c217-4225-acf4-25285fff8282\">|<img\nwidth=\"637\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/9aa77aa4-7a77-45ac-8cf4-95b5203d0f5a\">\n\n---------\n\nCo-authored-by: Cauê Marcondes <[email protected]>","sha":"a882b2ce48ecc741433aa6df67606f434024a469","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","v9.0.0","backport:prev-minor","ci:project-deploy-observability"],"title":"[Infra] Show all alerts in Infra views (Host + Containers) for consistency with entity inventory ","number":202188,"url":"https://github.com/elastic/kibana/pull/202188","mergeCommit":{"message":"[Infra] Show all alerts in Infra views (Host + Containers) for consistency with entity inventory (#202188)\n\n## Summary\n\nCloses https://github.com/elastic/kibana/issues/201567\nFixes #181580 and #201528\n\nThis PR ensures that Infra views display all alerts, regardless of index\npattern.\nIt provides consistent alert visibility across services.\n- **Alert counts per host in the Hosts List now shows all host alerts**\n- **Alert counts in alerting tab in Hosts List now shows all host\nalerts**\n- **Hosts Views now shows all host alerts**\n- **Container Views now shows all container alerts**\n- **Alert counts shown in Hosts Lists and Host Views now are consistent\nwith alerting app when filtered by host**\n- **Clicking through alerts in host/container views now filters by just\nthe entity ID**\n- **Clicking `Show all` in `Hosts` now goes to Alerts app with all hosts\nthat have alerts in the filter**\n- **Clicking an Alert in Entity Inventory now searches by just the\nentity ID**\n\n## Screenshots\nScreen|Before|After\n-|-|-\nEntity inventory (no changes here, just showing the alert count for next\nscreens)|<img width=\"1276\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/e6054957-b9d8-4d19-8ce3-b101f60099a2\">|<img\nwidth=\"772\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/2b64fb4d-ff60-4c6b-8e15-3ccb5ae6621b\">\nHost detail view|<img width=\"662\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/0dd405bc-888a-4fd0-9412-6016e8ae3795\">|<img\nwidth=\"775\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/bf694b1d-b7bb-4cc8-abd1-bebb2070d11c\">\nHost List view|<img width=\"536\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/a9c7ae89-8549-49d0-aeb3-3dc28dd3f713\"><img\nwidth=\"894\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/38433bfb-66b0-4c08-824a-ccf46ad93e50\">|<img\nwidth=\"582\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/7addf149-9f12-45a3-b443-9cd069edc4a9\"><img\nwidth=\"731\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/51e80e6c-504b-40b0-80b7-a9a58a6ad153\">\nContainer detail view|<img width=\"676\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/851cafec-d580-4184-a7a1-7b87620ea1b4\">|<img\nwidth=\"698\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/aebdd4f5-26f1-4b74-8cf4-37dc74aad112\">\nClick `Show all` in Host List|<img width=\"696\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/0557f9f8-aee3-4898-be17-372f3522f160\">|<img\nwidth=\"1096\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/c5ace835-a56b-45cb-95c7-fa978d7840f5\">\nClick `Show all` in Host/Container detail view|<img width=\"712\"\nalt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/eb04c059-aff0-48f4-90fb-73c08943cb57\">|<img\nwidth=\"748\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/189f686d-5931-4f42-bf14-ac9f1ae987e4\">\nClick alert in Entity Inventory|<img width=\"677\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/e99f70a1-c217-4225-acf4-25285fff8282\">|<img\nwidth=\"637\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/9aa77aa4-7a77-45ac-8cf4-95b5203d0f5a\">\n\n---------\n\nCo-authored-by: Cauê Marcondes <[email protected]>","sha":"a882b2ce48ecc741433aa6df67606f434024a469"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/202188","number":202188,"mergeCommit":{"message":"[Infra] Show all alerts in Infra views (Host + Containers) for consistency with entity inventory (#202188)\n\n## Summary\n\nCloses https://github.com/elastic/kibana/issues/201567\nFixes #181580 and #201528\n\nThis PR ensures that Infra views display all alerts, regardless of index\npattern.\nIt provides consistent alert visibility across services.\n- **Alert counts per host in the Hosts List now shows all host alerts**\n- **Alert counts in alerting tab in Hosts List now shows all host\nalerts**\n- **Hosts Views now shows all host alerts**\n- **Container Views now shows all container alerts**\n- **Alert counts shown in Hosts Lists and Host Views now are consistent\nwith alerting app when filtered by host**\n- **Clicking through alerts in host/container views now filters by just\nthe entity ID**\n- **Clicking `Show all` in `Hosts` now goes to Alerts app with all hosts\nthat have alerts in the filter**\n- **Clicking an Alert in Entity Inventory now searches by just the\nentity ID**\n\n## Screenshots\nScreen|Before|After\n-|-|-\nEntity inventory (no changes here, just showing the alert count for next\nscreens)|<img width=\"1276\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/e6054957-b9d8-4d19-8ce3-b101f60099a2\">|<img\nwidth=\"772\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/2b64fb4d-ff60-4c6b-8e15-3ccb5ae6621b\">\nHost detail view|<img width=\"662\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/0dd405bc-888a-4fd0-9412-6016e8ae3795\">|<img\nwidth=\"775\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/bf694b1d-b7bb-4cc8-abd1-bebb2070d11c\">\nHost List view|<img width=\"536\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/a9c7ae89-8549-49d0-aeb3-3dc28dd3f713\"><img\nwidth=\"894\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/38433bfb-66b0-4c08-824a-ccf46ad93e50\">|<img\nwidth=\"582\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/7addf149-9f12-45a3-b443-9cd069edc4a9\"><img\nwidth=\"731\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/51e80e6c-504b-40b0-80b7-a9a58a6ad153\">\nContainer detail view|<img width=\"676\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/851cafec-d580-4184-a7a1-7b87620ea1b4\">|<img\nwidth=\"698\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/aebdd4f5-26f1-4b74-8cf4-37dc74aad112\">\nClick `Show all` in Host List|<img width=\"696\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/0557f9f8-aee3-4898-be17-372f3522f160\">|<img\nwidth=\"1096\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/c5ace835-a56b-45cb-95c7-fa978d7840f5\">\nClick `Show all` in Host/Container detail view|<img width=\"712\"\nalt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/eb04c059-aff0-48f4-90fb-73c08943cb57\">|<img\nwidth=\"748\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/189f686d-5931-4f42-bf14-ac9f1ae987e4\">\nClick alert in Entity Inventory|<img width=\"677\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/e99f70a1-c217-4225-acf4-25285fff8282\">|<img\nwidth=\"637\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/9aa77aa4-7a77-45ac-8cf4-95b5203d0f5a\">\n\n---------\n\nCo-authored-by: Cauê Marcondes <[email protected]>","sha":"a882b2ce48ecc741433aa6df67606f434024a469"}}]}] BACKPORT--> Co-authored-by: Sergi Romeu <[email protected]>
Summary
Closes #201567
Fixes #181580 and #201528
This PR ensures that Infra views display all alerts, regardless of index pattern.
It provides consistent alert visibility across services.
Show all
inHosts
now goes to Alerts app with all hosts that have alerts in the filterScreenshots
Show all
in Host ListShow all
in Host/Container detail view