Skip to content

[9.4] [Fix] Synthetics monitor health false positives and infinite _health polling (#270137)#270243

Merged
kibanamachine merged 1 commit into
elastic:9.4from
kibanamachine:backport/9.4/pr-270137
May 20, 2026
Merged

[9.4] [Fix] Synthetics monitor health false positives and infinite _health polling (#270137)#270243
kibanamachine merged 1 commit into
elastic:9.4from
kibanamachine:backport/9.4/pr-270137

Conversation

@kibanamachine
Copy link
Copy Markdown
Contributor

Backport

This will backport the following commits from main to 9.4:

Questions ?

Please refer to the Backport tool documentation

…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)
@kibanamachine
Copy link
Copy Markdown
Contributor Author

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #103 / Entity Analytics - Watchlists @ess @serverless @skipInServerlessMKI Watchlist Lifecycle should remove all entities from the watchlist index when the watchlist is deleted

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
synthetics 1.1MB 1.1MB +225.0B

cc @miguelmartin-elastic

@kibanamachine kibanamachine merged commit b860d6a into elastic:9.4 May 20, 2026
35 checks passed
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.

2 participants