Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Response Ops][Alerting] Exposing background worker utilization load …
…metric (#153600) Resolves #155762, #155761 ## Summary This PR exposes a metric that represents the background task worker utilization load at the end of each polling cycle. This is calculated as `(# of workers already busy + claimed tasks) / max workers`, which comes out to the number of workers in use at the end of each claim cycle. This metric is then averaged over the previous 15 seconds (or 5 polling cycles). This window size is configurable using `xpack.task_manager.worker_utilization_running_average_window` This PR exposes this metric in the existing `/internal/task_manager/_background_task_utilization` API but also adds a public version of this API (`/api/task_manager/_background_task_utilization`) that only exposes this metric. We need the public API for serverless but I thought we could keep the private route as well to expose experimental metrics without the overhead of supporting them long term. ## To Verify 1. Run ES and Kibana with this branch 2. Navigate to `/internal/task_manager/_background_task_utilization` and see the new metric exposed as `stats.value.load` along with the existing `adhoc` and `recurring` metrics 3. Navigate to `/api/task_manager/_background_task_utilization` and see only the load metric returned from the public API 4. You can also create some rules to see the load metric increase. --------- Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
- Loading branch information