elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.47k stars 8.04k forks source link

[ResponseOps][Task Manager] improve heath report to show task types with schedule breakdown #184049

Open pmuellr opened 1 month ago

pmuellr commented 1 month ago

Currently the task manager heath report includes an object stats.workload.value.schedule, whose value is an array of schedule intervals and the number of tasks using that schedule. For example:

"schedule": [
          ["3s", 1],
          ["10s", 1],
          ["1m", 4],
          ...
          ["720m", 2],
          ["24h", 6],
          ["1d", 3]
        ]

This actually looks a little concerning, seeing that there are tasks scheduled 3s and 10s, and we frequently think those are rules which are scheduled. But they aren't, they are non-rule tasks created by other plugins.

Feels like we should change this output, to include the task types that are referenced by each array item. To keep the shape as close as possible to the existing one, maybe we could add a third element to the arrays, which would be an array of the task types that are included here. Alternatively, for cases where multiple task types use the same interval, create a separate element for each.

For example:

"schedule": [
          ...
          ["1m", 4, ["task-a", "task-b"]],
          ...
        ]
"schedule": [
          ...
          ["1m", 3, "task-a"],
          ["1m", 1, "task-b"],
          ...
        ]

The first shape is closer to the original, in that there's no duplicate time entries, in case someone was using those to build a map or something. The second one is more "precise".

elasticmachine commented 1 month ago

Pinging @elastic/response-ops (Team:ResponseOps)