Skip to content

[9.1] [Security Solution][Entity Analytics][PrivMon] Handle null/undefined values gracefully for tiles on Privmon dashboard (#226387)#227577

Merged
abhishekbhatia1710 merged 3 commits intoelastic:9.1from
abhishekbhatia1710:backport/9.1/pr-226387
Jul 14, 2025
Merged

Conversation

@abhishekbhatia1710
Copy link
Contributor

Backport

This will backport the following commits from main to 9.1:

Questions ?

Please refer to the Backport tool documentation

…values gracefully for tiles on Privmon dashboard (elastic#226387)

## Summary

What changed:

Added error handling for PrivMon dashboard tiles when ES queries fail
(like missing ML indices)
Instead of showing broken visualizations, tiles now display a clean
"Data not available" message
The error tiles maintain consistent styling and layout with working
tiles

Added state tracking to detect when visualization loading completes
- Check for missing [tables] property in visualization response to
identify errors
- Render a styled error state using EUI components that matches the
design of working tiles
- Made error message i18n compliant for proper localization

Screenshot Ref :

![image](https://github.com/user-attachments/assets/3e989159-5fa2-4b57-9fe4-523f5785e109)

With data :

![image](https://github.com/user-attachments/assets/473f3254-32c2-4799-ba4b-51121932ab20)

Testing Steps :
1. Checkout this PR
2. Start the privmon engine : `POST
kbn:/api/entity_analytics/monitoring/engine/init`
3. Add some privileged users either using a CSV file or from dev
console.
4. Add relevant data for different indexes using the
security-documents-generator.
6. Enable the risk score and Asset criticality.
7. Change filters for timerange or any KQL query to get the desired
results.
8. The tile visualisations on the privmon dashboard should not display
any errors. It should either display the Count or `Data not available`.

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [ ] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
(cherry picked from commit df7732a)

# Conflicts:
#	x-pack/solutions/security/plugins/security_solution/public/entity_analytics/components/privileged_user_monitoring/components/key_insights_panel/index.tsx
Copy link
Contributor

@CAWilson94 CAWilson94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good! 🚀

@abhishekbhatia1710 abhishekbhatia1710 merged commit 3d4972b into elastic:9.1 Jul 14, 2025
11 of 12 checks passed
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
securitySolution 9.8MB 9.8MB +237.0B

History

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants