Skip to content

Add support for extended tasks information #1020

Open
@spapadop

Description

@spapadop

Currently, one can enable tasks collector with:

--collector.tasks
--tasks.actions="*" 

And the output metrics is like:

elasticsearch_task_stats_action{action="cluster:admin/snapshot/get"} 2
elasticsearch_task_stats_action{action="cluster:monitor/health"} 1
elasticsearch_task_stats_action{action="cluster:monitor/tasks/lists"} 1
elasticsearch_task_stats_action{action="cluster:monitor/tasks/lists[n]"} 3
elasticsearch_task_stats_action{action="indices:admin/mappings/get"} 1 

This is good enough to track how many tasks of each type is running at any time in your cluster, however it is not able to catch things like long running tasks. For example, imagine a long running search, indexing or reindexing task, that takes hours. One would like to be alerted whenever that happens so that an action is taken.

To achieve that, the labels that come with above metrics should be enhanced with information that are available on the GET _cat/tasks API, like task_id, type, start_time and running_time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions