Service status API

This document describes the API endpoints to retrieve service status, cluster information for Apache Druid.

In this document, http://SERVICE_IP:SERVICE_PORT is a placeholder for the server address of deployment and the service port. For example, on the quickstart configuration, replace http://ROUTER_IP:ROUTER_PORT with http://localhost:8888.

Common

All services support the following endpoints.

You can use each endpoint with the ports for each type of service. The following table contains port addresses for a local configuration:

ServicePort address
Coordinator8081
Overlord8081
Router8888
Broker8082
Historical8083
MiddleManager8091

Get service information

Retrieves the Druid version, loaded extensions, memory used, total memory, and other useful information about the individual service.

Modify the host and port for the endpoint to match the service to query. Refer to the default service ports for the port numbers.

URL

GET /status

Responses

  • 200 SUCCESS

Successfully retrieved service information


Sample request

  • cURL
  • HTTP
  1. curl "http://ROUTER_IP:ROUTER_PORT/status"
  1. GET /status HTTP/1.1
  2. Host: http://ROUTER_IP:ROUTER_PORT

Sample response

Click to show sample response

  1. {
  2. "version": "26.0.0",
  3. "modules": [
  4. {
  5. "name": "org.apache.druid.common.aws.AWSModule",
  6. "artifact": "druid-aws-common",
  7. "version": "26.0.0"
  8. },
  9. {
  10. "name": "org.apache.druid.common.gcp.GcpModule",
  11. "artifact": "druid-gcp-common",
  12. "version": "26.0.0"
  13. },
  14. {
  15. "name": "org.apache.druid.storage.hdfs.HdfsStorageDruidModule",
  16. "artifact": "druid-hdfs-storage",
  17. "version": "26.0.0"
  18. },
  19. {
  20. "name": "org.apache.druid.indexing.kafka.KafkaIndexTaskModule",
  21. "artifact": "druid-kafka-indexing-service",
  22. "version": "26.0.0"
  23. },
  24. {
  25. "name": "org.apache.druid.query.aggregation.datasketches.theta.SketchModule",
  26. "artifact": "druid-datasketches",
  27. "version": "26.0.0"
  28. },
  29. {
  30. "name": "org.apache.druid.query.aggregation.datasketches.theta.oldapi.OldApiSketchModule",
  31. "artifact": "druid-datasketches",
  32. "version": "26.0.0"
  33. },
  34. {
  35. "name": "org.apache.druid.query.aggregation.datasketches.quantiles.DoublesSketchModule",
  36. "artifact": "druid-datasketches",
  37. "version": "26.0.0"
  38. },
  39. {
  40. "name": "org.apache.druid.query.aggregation.datasketches.tuple.ArrayOfDoublesSketchModule",
  41. "artifact": "druid-datasketches",
  42. "version": "26.0.0"
  43. },
  44. {
  45. "name": "org.apache.druid.query.aggregation.datasketches.hll.HllSketchModule",
  46. "artifact": "druid-datasketches",
  47. "version": "26.0.0"
  48. },
  49. {
  50. "name": "org.apache.druid.query.aggregation.datasketches.kll.KllSketchModule",
  51. "artifact": "druid-datasketches",
  52. "version": "26.0.0"
  53. },
  54. {
  55. "name": "org.apache.druid.msq.guice.MSQExternalDataSourceModule",
  56. "artifact": "druid-multi-stage-query",
  57. "version": "26.0.0"
  58. },
  59. {
  60. "name": "org.apache.druid.msq.guice.MSQIndexingModule",
  61. "artifact": "druid-multi-stage-query",
  62. "version": "26.0.0"
  63. },
  64. {
  65. "name": "org.apache.druid.msq.guice.MSQDurableStorageModule",
  66. "artifact": "druid-multi-stage-query",
  67. "version": "26.0.0"
  68. },
  69. {
  70. "name": "org.apache.druid.msq.guice.MSQServiceClientModule",
  71. "artifact": "druid-multi-stage-query",
  72. "version": "26.0.0"
  73. },
  74. {
  75. "name": "org.apache.druid.msq.guice.MSQSqlModule",
  76. "artifact": "druid-multi-stage-query",
  77. "version": "26.0.0"
  78. },
  79. {
  80. "name": "org.apache.druid.msq.guice.SqlTaskModule",
  81. "artifact": "druid-multi-stage-query",
  82. "version": "26.0.0"
  83. }
  84. ],
  85. "memory": {
  86. "maxMemory": 268435456,
  87. "totalMemory": 268435456,
  88. "freeMemory": 139060688,
  89. "usedMemory": 129374768,
  90. "directMemory": 134217728
  91. }
  92. }

Get service health

Retrieves the online status of the individual Druid service. It is a simple health check to determine if the service is running and accessible. If online, it will always return a boolean true value, indicating that the service can receive API calls. This endpoint is suitable for automated health checks.

Modify the host and port for the endpoint to match the service to query. Refer to the default service ports for the port numbers.

Additional checks for readiness should use the Historical segment readiness and Broker query readiness endpoints.

URL

GET /status/health

Responses

  • 200 SUCCESS

Successfully retrieved service health

Sample request

  • cURL
  • HTTP
  1. curl "http://ROUTER_IP:ROUTER_PORT/status/health"
  1. GET /status/health HTTP/1.1
  2. Host: http://ROUTER_IP:ROUTER_PORT

Sample response

Click to show sample response

  1. true

Get configuration properties

Retrieves the current configuration properties of the individual service queried.

Modify the host and port for the endpoint to match the service to query. Refer to the default service ports for the port numbers.

URL

GET /status/properties

Responses

  • 200 SUCCESS

Successfully retrieved service configuration properties

Sample request

  • cURL
  • HTTP
  1. curl "http://ROUTER_IP:ROUTER_PORT/status/properties"
  1. GET /status/properties HTTP/1.1
  2. Host: http://ROUTER_IP:ROUTER_PORT

Sample response

Click to show sample response

  1. {
  2. "gopherProxySet": "false",
  3. "awt.toolkit": "sun.lwawt.macosx.LWCToolkit",
  4. "druid.monitoring.monitors": "[\"org.apache.druid.java.util.metrics.JvmMonitor\"]",
  5. "java.specification.version": "11",
  6. "sun.cpu.isalist": "",
  7. "druid.plaintextPort": "8888",
  8. "sun.jnu.encoding": "UTF-8",
  9. "druid.indexing.doubleStorage": "double",
  10. "druid.metadata.storage.connector.port": "1527",
  11. "java.class.path": "/Users/genericUserPath",
  12. "log4j.shutdownHookEnabled": "true",
  13. "java.vm.vendor": "Homebrew",
  14. "sun.arch.data.model": "64",
  15. "druid.extensions.loadList": "[\"druid-hdfs-storage\", \"druid-kafka-indexing-service\", \"druid-datasketches\", \"druid-multi-stage-query\"]",
  16. "java.vendor.url": "https://github.com/Homebrew/homebrew-core/issues",
  17. "druid.router.coordinatorServiceName": "druid/coordinator",
  18. "user.timezone": "UTC",
  19. "druid.global.http.eagerInitialization": "false",
  20. "os.name": "Mac OS X",
  21. "java.vm.specification.version": "11",
  22. "sun.java.launcher": "SUN_STANDARD",
  23. "user.country": "US",
  24. "sun.boot.library.path": "/opt/homebrew/Cellar/openjdk@11/11.0.19/libexec/openjdk.jdk/Contents/Home/lib",
  25. "sun.java.command": "org.apache.druid.cli.Main server router",
  26. "http.nonProxyHosts": "local|*.local|169.254/16|*.169.254/16",
  27. "jdk.debug": "release",
  28. "druid.metadata.storage.connector.host": "localhost",
  29. "sun.cpu.endian": "little",
  30. "druid.zk.paths.base": "/druid",
  31. "user.home": "/Users/genericUser",
  32. "user.language": "en",
  33. "java.specification.vendor": "Oracle Corporation",
  34. "java.version.date": "2023-04-18",
  35. "java.home": "/opt/homebrew/Cellar/openjdk@11/11.0.19/libexec/openjdk.jdk/Contents/Home",
  36. "druid.service": "druid/router",
  37. "druid.selectors.coordinator.serviceName": "druid/coordinator",
  38. "druid.metadata.storage.connector.connectURI": "jdbc:derby://localhost:1527/var/druid/metadata.db;create=true",
  39. "file.separator": "/",
  40. "druid.selectors.indexing.serviceName": "druid/overlord",
  41. "java.vm.compressedOopsMode": "Zero based",
  42. "druid.metadata.storage.type": "derby",
  43. "line.separator": "\n",
  44. "druid.log.path": "/Users/genericUserPath",
  45. "java.vm.specification.vendor": "Oracle Corporation",
  46. "java.specification.name": "Java Platform API Specification",
  47. "druid.indexer.logs.directory": "var/druid/indexing-logs",
  48. "java.awt.graphicsenv": "sun.awt.CGraphicsEnvironment",
  49. "druid.router.defaultBrokerServiceName": "druid/broker",
  50. "druid.storage.storageDirectory": "var/druid/segments",
  51. "sun.management.compiler": "HotSpot 64-Bit Tiered Compilers",
  52. "ftp.nonProxyHosts": "local|*.local|169.254/16|*.169.254/16",
  53. "java.runtime.version": "11.0.19+0",
  54. "user.name": "genericUser",
  55. "druid.indexer.logs.type": "file",
  56. "druid.host": "localhost",
  57. "log4j2.is.webapp": "false",
  58. "path.separator": ":",
  59. "os.version": "12.6.5",
  60. "druid.lookup.enableLookupSyncOnStartup": "false",
  61. "java.runtime.name": "OpenJDK Runtime Environment",
  62. "druid.zk.service.host": "localhost",
  63. "file.encoding": "UTF-8",
  64. "druid.sql.planner.useGroupingSetForExactDistinct": "true",
  65. "druid.router.managementProxy.enabled": "true",
  66. "java.vm.name": "OpenJDK 64-Bit Server VM",
  67. "java.vendor.version": "Homebrew",
  68. "druid.startup.logging.logProperties": "true",
  69. "java.vendor.url.bug": "https://github.com/Homebrew/homebrew-core/issues",
  70. "log4j.shutdownCallbackRegistry": "org.apache.druid.common.config.Log4jShutdown",
  71. "java.io.tmpdir": "var/tmp",
  72. "druid.sql.enable": "true",
  73. "druid.emitter.logging.logLevel": "info",
  74. "java.version": "11.0.19",
  75. "user.dir": "/Users/genericUser/Downloads/apache-druid-26.0.0",
  76. "os.arch": "aarch64",
  77. "java.vm.specification.name": "Java Virtual Machine Specification",
  78. "druid.node.type": "router",
  79. "java.awt.printerjob": "sun.lwawt.macosx.CPrinterJob",
  80. "sun.os.patch.level": "unknown",
  81. "java.util.logging.manager": "org.apache.logging.log4j.jul.LogManager",
  82. "java.library.path": "/Users/genericUserPath",
  83. "java.vendor": "Homebrew",
  84. "java.vm.info": "mixed mode",
  85. "java.vm.version": "11.0.19+0",
  86. "druid.emitter": "noop",
  87. "sun.io.unicode.encoding": "UnicodeBig",
  88. "druid.storage.type": "local",
  89. "druid.expressions.useStrictBooleans": "true",
  90. "java.class.version": "55.0",
  91. "socksNonProxyHosts": "local|*.local|169.254/16|*.169.254/16",
  92. "druid.server.hiddenProperties": "[\"druid.s3.accessKey\",\"druid.s3.secretKey\",\"druid.metadata.storage.connector.password\", \"password\", \"key\", \"token\", \"pwd\"]"
  93. }

Get node discovery status and cluster integration confirmation

Retrieves a JSON map of the form {"selfDiscovered": true/false}, indicating whether the node has received a confirmation from the central node discovery mechanism (currently ZooKeeper) of the Druid cluster that the node has been added to the cluster.

Only consider a Druid node “healthy” or “ready” in automated deployment/container management systems when this endpoint returns {"selfDiscovered": true}. Nodes experiencing network issues may become isolated and are not healthy. For nodes that use Zookeeper segment discovery, a response of {"selfDiscovered": true} indicates that the node’s Zookeeper client has started receiving data from the Zookeeper cluster, enabling timely discovery of segments and other nodes.

URL

GET /status/selfDiscovered/status

Responses

  • 200 SUCCESS

Node was successfully added to the cluster

Sample request

  • cURL
  • HTTP
  1. curl "http://ROUTER_IP:ROUTER_PORT/status/selfDiscovered/status"
  1. GET /status/selfDiscovered/status HTTP/1.1
  2. Host: http://ROUTER_IP:ROUTER_PORT

Sample response

Click to show sample response

  1. {
  2. "selfDiscovered": true
  3. }

Get node self-discovery status

Returns an HTTP status code to indicate node discovery within the Druid cluster. This endpoint is similar to the status/selfDiscovered/status endpoint, but relies on HTTP status codes alone. Use this endpoint for monitoring checks that are unable to examine the response body. For example, AWS load balancer health checks.

URL

GET /status/selfDiscovered

Responses

  • 200 SUCCESS
  • 503 SERVICE UNAVAILABLE

Successfully retrieved node status

Unsuccessful node self-discovery

Sample request

  • cURL
  • HTTP
  1. curl "http://ROUTER_IP:ROUTER_PORT/status/selfDiscovered"
  1. GET /status/selfDiscovered HTTP/1.1
  2. Host: http://ROUTER_IP:ROUTER_PORT

Sample response

A successful response to this endpoint results in an empty response body.

Coordinator

Get Coordinator leader address

Retrieves the address of the current leader Coordinator of the cluster. If any request is sent to a non-leader Coordinator, the request is automatically redirected to the leader Coordinator.

URL

GET /druid/coordinator/v1/leader

Responses

  • 200 SUCCESS

Successfully retrieved leader Coordinator address


Sample request

  • cURL
  • HTTP
  1. curl "http://ROUTER_IP:ROUTER_PORT/druid/coordinator/v1/leader"
  1. GET /druid/coordinator/v1/leader HTTP/1.1
  2. Host: http://ROUTER_IP:ROUTER_PORT

Sample response

Click to show sample response

  1. http://localhost:8081

Get Coordinator leader status

Retrieves a JSON object with a leader key. Returns true if this server is the current leader Coordinator of the cluster. To get the individual address of the leader Coordinator node, see the leader endpoint.

Use this endpoint as a load balancer status check when you only want the active leader to be considered in-service at the load balancer.

URL

GET /druid/coordinator/v1/isLeader

Responses

  • 200 SUCCESS
  • 404 NOT FOUND

Current server is the leader

Current server is not the leader


Sample request

  • cURL
  • HTTP
  1. curl "http://COORDINATOR_IP:COORDINATOR_PORT/druid/coordinator/v1/isLeader"
  1. GET /druid/coordinator/v1/isLeader HTTP/1.1
  2. Host: http://COORDINATOR_IP:COORDINATOR_PORT

Sample response

Click to show sample response

  1. {
  2. "leader": true
  3. }

Overlord

Get Overlord leader address

Retrieves the address of the current leader Overlord of the cluster. In a cluster of multiple Overlords, only one Overlord assumes the leading role, while the remaining Overlords remain on standby.

URL

GET /druid/indexer/v1/leader

Responses

  • 200 SUCCESS

Successfully retrieved leader Overlord address


Sample request

  • cURL
  • HTTP
  1. curl "http://ROUTER_IP:ROUTER_PORT/druid/indexer/v1/leader"
  1. GET /druid/indexer/v1/leader HTTP/1.1
  2. Host: http://ROUTER_IP:ROUTER_PORT

Sample response

Click to show sample response

  1. http://localhost:8081

Get Overlord leader status

Retrieves a JSON object with a leader property. The value can be true or false, indicating if this server is the current leader Overlord of the cluster. To get the individual address of the leader Overlord node, see the leader endpoint.

Use this endpoint as a load balancer status check when you only want the active leader to be considered in-service at the load balancer.

URL

GET /druid/indexer/v1/isLeader

Responses

  • 200 SUCCESS
  • 404 NOT FOUND

Current server is the leader

Current server is not the leader


Sample request

  • cURL
  • HTTP
  1. curl "http://OVERLORD_IP:OVERLORD_PORT/druid/indexer/v1/isLeader"
  1. GET /druid/indexer/v1/isLeader HTTP/1.1
  2. Host: http://OVERLORD_IP:OVERLORD_PORT

Sample response

Click to show sample response

  1. {
  2. "leader": true
  3. }

MiddleManager

Get MiddleManager state status

Retrieves the enabled state of the MiddleManager. Returns JSON object keyed by the combined druid.host and druid.port with a boolean true or false state as the value.

URL

GET /druid/worker/v1/enabled

Responses

  • 200 SUCCESS

Successfully retrieved MiddleManager state


Sample request

  • cURL
  • HTTP
  1. curl "http://MIDDLEMANAGER_IP:MIDDLEMANAGER_PORT/druid/worker/v1/enabled"
  1. GET /druid/worker/v1/enabled HTTP/1.1
  2. Host: http://MIDDLEMANAGER_IP:MIDDLEMANAGER_PORT

Sample response

Click to show sample response

  1. {
  2. "localhost:8091": true
  3. }

Get active tasks

Retrieves a list of active tasks being run on MiddleManager. Returns JSON list of task ID strings. Note that for normal usage, you should use the /druid/indexer/v1/tasks Tasks API endpoint or one of the task state specific variants instead.

URL

GET /druid/worker/v1/tasks

Responses

  • 200 SUCCESS

Successfully retrieved active tasks


Sample request

  • cURL
  • HTTP
  1. curl "http://MIDDLEMANAGER_IP:MIDDLEMANAGER_PORT/druid/worker/v1/tasks"
  1. GET /druid/worker/v1/tasks HTTP/1.1
  2. Host: http://MIDDLEMANAGER_IP:MIDDLEMANAGER_PORT

Sample response

Click to show sample response

  1. [
  2. "index_parallel_wikipedia_mgchefio_2023-06-13T22:18:05.360Z"
  3. ]

Get task log

Retrieves task log output stream by task ID. For normal usage, you should use the /druid/indexer/v1/task/{taskId}/log Tasks API endpoint instead.

URL

GET /druid/worker/v1/task/:taskId/log

Shut down running task

Shuts down a running task by ID. For normal usage, you should use the /druid/indexer/v1/task/:taskId/shutdown Tasks API endpoint instead.

URL

POST /druid/worker/v1/task/:taskId/shutdown

Responses

  • 200 SUCCESS

Successfully shut down a task


Sample request

The following example shuts down a task with specified ID index_kafka_wikiticker_f7011f8ffba384b_fpeclode.

  • cURL
  • HTTP
  1. curl "http://MIDDLEMANAGER_IP:MIDDLEMANAGER_PORT/druid/worker/v1/task/index_kafka_wikiticker_f7011f8ffba384b_fpeclode/shutdown"
  1. POST /druid/worker/v1/task/index_kafka_wikiticker_f7011f8ffba384b_fpeclode/shutdown HTTP/1.1
  2. Host: http://MIDDLEMANAGER_IP:MIDDLEMANAGER_PORT

Sample response

Click to show sample response

  1. {
  2. "task":"index_kafka_wikiticker_f7011f8ffba384b_fpeclode"
  3. }

Disable MiddleManager

Disables a MiddleManager, causing it to stop accepting new tasks but complete all existing tasks. Returns a JSON object keyed by the combined druid.host and druid.port.

URL

POST /druid/worker/v1/disable

Responses

  • 200 SUCCESS

Successfully disabled MiddleManager

Sample request

  • cURL
  • HTTP
  1. curl "http://MIDDLEMANAGER_IP:MIDDLEMANAGER_PORT/druid/worker/v1/disable"
  1. POST /druid/worker/v1/disable HTTP/1.1
  2. Host: http://MIDDLEMANAGER_IP:MIDDLEMANAGER_PORT

Sample response

Click to show sample response

  1. {
  2. "localhost:8091":"disabled"
  3. }

Enable MiddleManager

Enables a MiddleManager, allowing it to accept new tasks again if it was previously disabled. Returns a JSON object keyed by the combined druid.host and druid.port.

URL

POST /druid/worker/v1/enable

Responses

  • 200 SUCCESS

Successfully enabled MiddleManager

Sample request

  • cURL
  • HTTP
  1. curl "http://MIDDLEMANAGER_IP:MIDDLEMANAGER_PORT/druid/worker/v1/enable"
  1. POST /druid/worker/v1/enable HTTP/1.1
  2. Host: http://MIDDLEMANAGER_IP:MIDDLEMANAGER_PORT

Sample response

Click to show sample response

  1. {
  2. "localhost:8091":"enabled"
  3. }

Historical

Get segment load status

Retrieves a JSON object of the form {"cacheInitialized":value}, where value is either true or false indicating if all segments in the local cache have been loaded.

Use this endpoint to know when a Broker service is ready to accept queries after a restart.

URL

GET /druid/historical/v1/loadstatus

Responses

  • 200 SUCCESS

Successfully retrieved status

Sample request

  • cURL
  • HTTP
  1. curl "http://HISTORICAL_IP:HISTORICAL_PORT/druid/historical/v1/loadstatus"
  1. GET /druid/historical/v1/loadstatus HTTP/1.1
  2. Host: http://HISTORICAL_IP:HISTORICAL_PORT

Sample response

Click to show sample response

  1. {
  2. "cacheInitialized": true
  3. }

Get segment readiness

Retrieves a status code to indicate if all segments in the local cache have been loaded. Similar to /druid/historical/v1/loadstatus, but instead of returning JSON with a flag, it returns status codes.

URL

GET /druid/historical/v1/readiness

Responses

  • 200 SUCCESS
  • 503 SERVICE UNAVAILABLE

Segments in local cache successfully loaded

Segments in local cache have not been loaded

Sample request

  • cURL
  • HTTP
  1. curl "http://HISTORICAL_IP:HISTORICAL_PORT/druid/historical/v1/readiness"
  1. GET /druid/historical/v1/readiness HTTP/1.1
  2. Host: http://HISTORICAL_IP:HISTORICAL_PORT

Sample response

A successful response to this endpoint results in an empty response body.

Load Status

Get Broker query load status

Retrieves a flag indicating if the Broker knows about all segments in the cluster. Use this endpoint to know when a Broker service is ready to accept queries after a restart.

URL

GET /druid/broker/v1/loadstatus

Responses

  • 200 SUCCESS

Segments successfully loaded

Sample request

  • cURL
  • HTTP
  1. curl "http://BROKER_IP:BROKER_PORT/druid/broker/v1/loadstatus"
  1. GET /druid/broker/v1/loadstatus HTTP/1.1
  2. Host: http://<BROKER_IP>:<BROKER_PORT>

Sample response

Click to show sample response

  1. {
  2. "inventoryInitialized": true
  3. }

Get Broker query readiness

Retrieves a status code to indicate Broker readiness. Readiness signifies the Broker knows about all segments in the cluster and is ready to accept queries after a restart. Similar to /druid/broker/v1/loadstatus, but instead of returning a JSON, it returns status codes.

URL

GET /druid/broker/v1/readiness

Responses

  • 200 SUCCESS
  • 503 SERVICE UNAVAILABLE

Segments successfully loaded

Segments have not been loaded

Sample request

  • cURL
  • HTTP
  1. curl "http://BROKER_IP:BROKER_PORT/druid/broker/v1/readiness"
  1. GET /druid/broker/v1/readiness HTTP/1.1
  2. Host: http://BROKER_IP:BROKER_PORT

Sample response

A successful response to this endpoint results in an empty response body.