Monitor tasks status _0.12.3

How to get middle manager task monitoring achieved?

Hi Chitra,
I believe the following maybe what you are looking for.

Enabling emitters

https://druid.apache.org/docs/latest/configuration/index.html#emitting-metrics

List of emitters

https://druid.apache.org/docs/latest/operations/metrics.html

Hi Chitra,

If you would want to monitor the tasks programatically one way is you could use the Overlord APIs https://druid.apache.org/docs/latest/operations/api-reference.html#overlord

GET /druid/indexer/v1/tasks accepts query parameters state, datasource etc. There are variants of this API.

For instance you can use /druid/indexer/v1/tasks?state=complete?datasource=my_datasource and pass other relevant query parameters. Keep polling the API to get the task status. Integrating this

into your workflow you can build notifications to get task completion status.

Thanks,

Sashi

Hi Sashi,

Thanks for the reply.

This latest API is not supported in 0.12.3 version and thus having difficulties to monitor the tasks for each datasource with the API.

http://druid.io/docs/0.12.3/operations/api-reference.html#overlord

Chitra

Hi Chitra,

For version 0.12.3, I see GET /druid/indexer/v1/task/{taskId}/status is available. This can be used to get the task status, you need to supply the task id.

Thanks,

Sashi

But apparently, for writing automate monitoring enablement knowing taskid upfront is hard.
There should be a way to iterate the list of taskids for a datasource, by which I can do the alerting; which doesnt seem to be possible in 0.12.3 version

When a task is posted to overlord /druid/indexer/v1/task, the API returns the task id of the submitted task. You can use this task id to supply it to the status API.