Performance Analyzer API

Introduced 1.0

Performance Analyzer uses a single HTTP method and URI for most requests:

  1. GET <endpoint>:9600/_plugins/_performanceanalyzer/metrics

Note the use of port 9600. Provide parameters for metrics, aggregations, dimensions, and nodes (optional):

  1. ?metrics=<metrics>&agg=<aggregations>&dim=<dimensions>&nodes=all"

For a full list of metrics, see Metrics reference. Performance Analyzer updates its data every five seconds. If you create a custom client, we recommend using that same interval for calls to the API.

Example request

  1. GET localhost:9600/_plugins/_performanceanalyzer/metrics?metrics=Latency,CPU_Utilization&agg=avg,max&dim=ShardID&nodes=all

Example response

  1. {
  2. "keHlhQbbTpm1BYicficEQg": {
  3. "timestamp": 1554940530000,
  4. "data": {
  5. "fields": [{
  6. "name": "ShardID",
  7. "type": "VARCHAR"
  8. },
  9. {
  10. "name": "Latency",
  11. "type": "DOUBLE"
  12. },
  13. {
  14. "name": "CPU_Utilization",
  15. "type": "DOUBLE"
  16. }
  17. ],
  18. "records": [
  19. [
  20. null,
  21. null,
  22. 0.012552206029147535
  23. ],
  24. [
  25. "1",
  26. 4.8,
  27. 0.0009780939762972104
  28. ]
  29. ]
  30. }
  31. },
  32. "bHdpbMJZTs-TKtZro2SmYA": {
  33. "timestamp": 1554940530000,
  34. "data": {
  35. "fields": [{
  36. "name": "ShardID",
  37. "type": "VARCHAR"
  38. },
  39. {
  40. "name": "Latency",
  41. "type": "DOUBLE"
  42. },
  43. {
  44. "name": "CPU_Utilization",
  45. "type": "DOUBLE"
  46. }
  47. ],
  48. "records": [
  49. [
  50. null,
  51. 18.2,
  52. 0.011966493817311527
  53. ],
  54. [
  55. "1",
  56. 14.8,
  57. 0.0007670829370071493
  58. ]
  59. ]
  60. }
  61. }
  62. }

In this case, each top-level object represents a node. The API returns names and data types for the metrics and dimensions that you specified, along with values from five seconds ago and current values (if different). Null values represent inactivity during that time period.

Performance Analyzer has one additional URI that returns the unit for each metric.

Example request

  1. GET localhost:9600/_plugins/_performanceanalyzer/metrics/units

Example response

  1. {
  2. "Disk_Utilization": "%",
  3. "Cache_Request_Hit": "count",
  4. "HTTP_RequestDocs": "count",
  5. "Net_TCP_Lost": "segments/flow",
  6. "Refresh_Time": "ms",
  7. "GC_Collection_Event": "count",
  8. "Merge_Time": "ms",
  9. "Sched_CtxRate": "count/s",
  10. "Cache_Request_Size": "B",
  11. "ThreadPool_QueueSize": "count",
  12. "Sched_Runtime": "s/ctxswitch",
  13. "Disk_ServiceRate": "MB/s",
  14. "Heap_AllocRate": "B/s",
  15. "Heap_Max": "B",
  16. "Sched_Waittime": "s/ctxswitch",
  17. "ShardBulkDocs": "count",
  18. "Thread_Blocked_Time": "s/event",
  19. "VersionMap_Memory": "B",
  20. "Master_Task_Queue_Time": "ms",
  21. "Merge_CurrentEvent": "count",
  22. "Indexing_Buffer": "B",
  23. "Bitset_Memory": "B",
  24. "Net_PacketDropRate4": "packets/s",
  25. "Heap_Committed": "B",
  26. "Net_PacketDropRate6": "packets/s",
  27. "Thread_Blocked_Event": "count",
  28. "GC_Collection_Time": "ms",
  29. "Cache_Query_Miss": "count",
  30. "IO_TotThroughput": "B/s",
  31. "Latency": "ms",
  32. "Net_PacketRate6": "packets/s",
  33. "Cache_Query_Hit": "count",
  34. "IO_ReadSyscallRate": "count/s",
  35. "Net_PacketRate4": "packets/s",
  36. "Cache_Request_Miss": "count",
  37. "CB_ConfiguredSize": "B",
  38. "CB_TrippedEvents": "count",
  39. "ThreadPool_RejectedReqs": "count",
  40. "Disk_WaitTime": "ms",
  41. "Net_TCP_TxQ": "segments/flow",
  42. "Master_Task_Run_Time": "ms",
  43. "IO_WriteSyscallRate": "count/s",
  44. "IO_WriteThroughput": "B/s",
  45. "Flush_Event": "count",
  46. "Net_TCP_RxQ": "segments/flow",
  47. "Refresh_Event": "count",
  48. "Flush_Time": "ms",
  49. "Heap_Init": "B",
  50. "CPU_Utilization": "cores",
  51. "HTTP_TotalRequests": "count",
  52. "ThreadPool_ActiveThreads": "count",
  53. "Cache_Query_Size": "B",
  54. "Paging_MinfltRate": "count/s",
  55. "Merge_Event": "count",
  56. "Net_TCP_SendCWND": "B/flow",
  57. "Cache_Request_Eviction": "count",
  58. "Segments_Total": "count",
  59. "Heap_Used": "B",
  60. "Cache_FieldData_Eviction": "count",
  61. "IO_TotalSyscallRate": "count/s",
  62. "CB_EstimatedSize": "B",
  63. "Net_Throughput": "B/s",
  64. "Paging_RSS": "pages",
  65. "Indexing_ThrottleTime": "ms",
  66. "IndexWriter_Memory": "B",
  67. "Master_PendingQueueSize": "count",
  68. "Net_TCP_SSThresh": "B/flow",
  69. "Cache_FieldData_Size": "B",
  70. "Paging_MajfltRate": "count/s",
  71. "ThreadPool_TotalThreads": "count",
  72. "IO_ReadThroughput": "B/s",
  73. "ShardEvents": "count",
  74. "Net_TCP_NumFlows": "count"
  75. }