[9.4] [Fix] Synthetics monitor health false positives and infinite _health polling (#270137)#270243
Merged
Merged
Conversation
…polling (elastic#270137) ## Summary Fixes elastic#270125 - **Server:** Use `MONITOR_QUERY_ID` (not the saved object UUID) when resolving Fleet package policy IDs in the monitor integration health API. Fixes false `missing_package_policy` for project-origin monitors on private locations. - **Client:** Stabilize monitor ID dependencies in `useMonitorIntegrationHealth` so inline `configIds` arrays (e.g. on monitor overview) do not retrigger `_health` fetches on every render. Fixes infinite polling to `/internal/synthetics/monitors/_health` when the missing-integration banner is shown. ## Test plan - [ ] Run unit tests: ```bash node scripts/jest x-pack/solutions/observability/plugins/synthetics/server/services/monitor_integration_health_api.test.ts node scripts/jest x-pack/solutions/observability/plugins/synthetics/public/apps/synthetics/components/common/hooks/use_monitor_integration_health.test.ts ``` - [ ] **Health API fix:** use a project monitor on a private location and call `POST /internal/synthetics/monitors/_health` — expect `healthy` when the Fleet package policy exists. - [ ] **Health API regression:** use a UI-origin monitor on a private location — expect `healthy` (UI monitors use `MONITOR_QUERY_ID === config_id`). - [ ] **Infinite polling fix:** open a project monitor overview that shows the missing-integration banner — confirm a single `_health` request (or one per refresh interval), not a continuous stream in the network tab. (cherry picked from commit b92ccae)
4 tasks
Contributor
Author
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Async chunks
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport
This will backport the following commits from
mainto9.4:Questions ?
Please refer to the Backport tool documentation