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
Middle Manager8091

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

View the 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

View the 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

View the response

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

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

View the 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

View the 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

View the 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

View the 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

View the response

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

Middle Manager

Get Middle Manager state status

Retrieves the enabled state of the Middle Manager process. 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 Middle Manager 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

View the response

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

Get active tasks

Retrieves a list of active tasks being run on the Middle Manager. 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

View the 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

View the response

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

Disable Middle Manager

Disables a Middle Manager, 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 Middle Manager

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

View the response

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

Enable Middle Manager

Enables a Middle Manager, 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 Middle Manager

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

View the 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

View the 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

View the 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.