Usage API

Usage API

New API reference

For the most up-to-date API details, refer to Usage APIs.

Provides usage information about the installed X-Pack features.

Request

GET /_xpack/usage

Prerequisites

  • If the Elasticsearch security features are enabled, you must have the monitor or manage cluster privilege to use this API.

Description

This API provides information about which features are currently enabled and available under the current license and some usage statistics.

Query parameters

master_timeout

(Optional, time units) Period to wait for the master node. If the master node is not available before the timeout expires, the request fails and returns an error. Defaults to 30s. Can also be set to -1 to indicate that the request should never timeout.

Examples

  1. resp = client.xpack.usage()
  2. print(resp)
  1. response = client.xpack.usage
  2. puts response
  1. const response = await client.xpack.usage();
  2. console.log(response);
  1. GET /_xpack/usage
  1. {
  2. "security" : {
  3. "available" : true,
  4. "enabled" : true,
  5. ...
  6. },
  7. "monitoring" : {
  8. "available" : true,
  9. "enabled" : true,
  10. "collection_enabled" : false,
  11. "enabled_exporters" : {
  12. "local" : 1
  13. }
  14. },
  15. "watcher" : {
  16. "available" : true,
  17. "enabled" : true,
  18. "execution" : {
  19. "actions" : {
  20. "_all" : {
  21. "total" : 0,
  22. "total_time_in_ms" : 0
  23. }
  24. }
  25. },
  26. "watch" : {
  27. "input" : {
  28. "_all" : {
  29. "total" : 0,
  30. "active" : 0
  31. }
  32. },
  33. "trigger" : {
  34. "_all" : {
  35. "total" : 0,
  36. "active" : 0
  37. }
  38. }
  39. },
  40. "count" : {
  41. "total" : 0,
  42. "active" : 0
  43. }
  44. },
  45. "graph" : {
  46. "available" : true,
  47. "enabled" : true
  48. },
  49. "ml" : {
  50. "available" : true,
  51. "enabled" : true,
  52. "jobs" : {
  53. "_all" : {
  54. "count" : 0,
  55. "detectors" : {
  56. ...
  57. },
  58. "created_by" : { },
  59. "model_size" : {
  60. ...
  61. },
  62. "forecasts" : {
  63. "total" : 0,
  64. "forecasted_jobs" : 0
  65. }
  66. }
  67. },
  68. "datafeeds" : {
  69. "_all" : {
  70. "count" : 0
  71. }
  72. },
  73. "data_frame_analytics_jobs" : {
  74. "_all" : {
  75. "count" : 0
  76. },
  77. "analysis_counts": { },
  78. "memory_usage": {
  79. "peak_usage_bytes": {
  80. "min": 0.0,
  81. "max": 0.0,
  82. "avg": 0.0,
  83. "total": 0.0
  84. }
  85. }
  86. },
  87. "inference" : {
  88. "ingest_processors" : {
  89. "_all" : {
  90. "num_docs_processed" : {
  91. "max" : 0,
  92. "sum" : 0,
  93. "min" : 0
  94. },
  95. "pipelines" : {
  96. "count" : 0
  97. },
  98. "num_failures" : {
  99. "max" : 0,
  100. "sum" : 0,
  101. "min" : 0
  102. },
  103. "time_ms" : {
  104. "max" : 0,
  105. "sum" : 0,
  106. "min" : 0
  107. }
  108. }
  109. },
  110. "trained_models" : {
  111. "_all" : {
  112. "count": 1
  113. },
  114. "count": {
  115. "total": 1,
  116. "prepackaged": 1,
  117. "other": 0
  118. },
  119. "model_size_bytes": {
  120. "min": 0.0,
  121. "max": 0.0,
  122. "avg": 0.0,
  123. "total": 0.0
  124. },
  125. "estimated_operations": {
  126. "min": 0.0,
  127. "max": 0.0,
  128. "avg": 0.0,
  129. "total": 0.0
  130. }
  131. },
  132. "deployments": {
  133. "count": 0,
  134. "inference_counts": {
  135. "total": 0.0,
  136. "min": 0.0,
  137. "avg": 0.0,
  138. "max": 0.0
  139. },
  140. "stats_by_model": [],
  141. "model_sizes_bytes": {
  142. "total": 0.0,
  143. "min": 0.0,
  144. "avg": 0.0,
  145. "max": 0.0
  146. },
  147. "time_ms": {
  148. "avg": 0.0
  149. }
  150. }
  151. },
  152. "node_count" : 1,
  153. "memory": {
  154. anomaly_detectors_memory_bytes: 0,
  155. data_frame_analytics_memory_bytes: 0,
  156. pytorch_inference_memory_bytes: 0,
  157. total_used_memory_bytes: 0
  158. }
  159. },
  160. "inference": {
  161. "available" : true,
  162. "enabled" : true,
  163. "models" : [{
  164. "service": "elasticsearch",
  165. "task_type": "SPARSE_EMBEDDING",
  166. "count": 1
  167. },
  168. {
  169. "service": "elasticsearch",
  170. "task_type": "TEXT_EMBEDDING",
  171. "count": 1
  172. },
  173. ]
  174. },
  175. "logstash" : {
  176. "available" : true,
  177. "enabled" : true
  178. },
  179. "eql" : {
  180. "available" : true,
  181. "enabled" : true,
  182. ...
  183. },
  184. "esql" : {
  185. "available" : true,
  186. "enabled" : true,
  187. "features" : {
  188. "eval" : 0,
  189. "stats" : 0,
  190. "dissect": 0,
  191. "grok" : 0,
  192. "limit" : 0,
  193. "where" : 0,
  194. "sort" : 0,
  195. "drop" : 0,
  196. "show" : 0,
  197. "rename" : 0,
  198. "mv_expand" : 0,
  199. "keep" : 0,
  200. "enrich" : 0,
  201. "from" : 0,
  202. "row" : 0
  203. },
  204. "queries" : {
  205. "rest" : {
  206. "total" : 0,
  207. "failed" : 0
  208. },
  209. "kibana" : {
  210. "total" : 0,
  211. "failed" : 0
  212. },
  213. "_all" : {
  214. "total" : 0,
  215. "failed" : 0
  216. }
  217. }
  218. },
  219. "sql" : {
  220. "available" : true,
  221. "enabled" : true,
  222. "features" : {
  223. "having" : 0,
  224. "subselect" : 0,
  225. "limit" : 0,
  226. "orderby" : 0,
  227. "where" : 0,
  228. "join" : 0,
  229. "groupby" : 0,
  230. "command" : 0,
  231. "local" : 0
  232. },
  233. "queries" : {
  234. "rest" : {
  235. "total" : 0,
  236. "paging" : 0,
  237. "failed" : 0
  238. },
  239. "cli" : {
  240. "total" : 0,
  241. "paging" : 0,
  242. "failed" : 0
  243. },
  244. "canvas" : {
  245. "total" : 0,
  246. "paging" : 0,
  247. "failed" : 0
  248. },
  249. "odbc" : {
  250. "total" : 0,
  251. "paging" : 0,
  252. "failed" : 0
  253. },
  254. "jdbc" : {
  255. "total" : 0,
  256. "paging" : 0,
  257. "failed" : 0
  258. },
  259. "odbc32" : {
  260. "total" : 0,
  261. "paging" : 0,
  262. "failed" : 0
  263. },
  264. "odbc64" : {
  265. "total" : 0,
  266. "paging" : 0,
  267. "failed" : 0
  268. },
  269. "_all" : {
  270. "total" : 0,
  271. "paging" : 0,
  272. "failed" : 0
  273. },
  274. "translate" : {
  275. "count" : 0
  276. }
  277. }
  278. },
  279. "rollup" : {
  280. "available" : true,
  281. "enabled" : true,
  282. ...
  283. },
  284. "ilm" : {
  285. "policy_count" : 3,
  286. "policy_stats" : [
  287. ...
  288. ]
  289. },
  290. "slm" : {
  291. "available" : true,
  292. "enabled" : true
  293. },
  294. "ccr" : {
  295. "available" : true,
  296. "enabled" : true,
  297. "follower_indices_count" : 0,
  298. "auto_follow_patterns_count" : 0
  299. },
  300. "transform" : {
  301. "available" : true,
  302. "enabled" : true
  303. },
  304. "voting_only" : {
  305. "available" : true,
  306. "enabled" : true
  307. },
  308. "searchable_snapshots" : {
  309. "available" : true,
  310. "enabled" : true,
  311. "indices_count" : 0,
  312. "full_copy_indices_count" : 0,
  313. "shared_cache_indices_count" : 0
  314. },
  315. "frozen_indices" : {
  316. "available" : true,
  317. "enabled" : true,
  318. "indices_count" : 0
  319. },
  320. "spatial" : {
  321. "available" : true,
  322. "enabled" : true
  323. },
  324. "analytics" : {
  325. "available" : true,
  326. "enabled" : true,
  327. "stats": {
  328. "boxplot_usage" : 0,
  329. "top_metrics_usage" : 0,
  330. "normalize_usage" : 0,
  331. "cumulative_cardinality_usage" : 0,
  332. "t_test_usage" : 0,
  333. "rate_usage" : 0,
  334. "string_stats_usage" : 0,
  335. "moving_percentiles_usage" : 0,
  336. "multi_terms_usage" : 0
  337. }
  338. },
  339. "data_streams" : {
  340. "available" : true,
  341. "enabled" : true,
  342. "data_streams" : 0,
  343. "indices_count" : 0
  344. },
  345. "data_lifecycle" : {
  346. "available": true,
  347. "enabled": true,
  348. "count": 0,
  349. "default_rollover_used": true,
  350. "data_retention": {
  351. "configured_data_streams": 0
  352. },
  353. "effective_retention": {
  354. "retained_data_streams": 0
  355. },
  356. "global_retention": {
  357. "default": {
  358. "defined": false
  359. },
  360. "max": {
  361. "defined": false
  362. }
  363. }
  364. },
  365. "data_tiers" : {
  366. "available" : true,
  367. "enabled" : true,
  368. "data_warm" : {
  369. "node_count" : 0,
  370. "index_count" : 0,
  371. "total_shard_count" : 0,
  372. "primary_shard_count" : 0,
  373. "doc_count" : 0,
  374. "total_size_bytes" : 0,
  375. "primary_size_bytes" : 0,
  376. "primary_shard_size_avg_bytes" : 0,
  377. "primary_shard_size_median_bytes" : 0,
  378. "primary_shard_size_mad_bytes" : 0
  379. },
  380. "data_frozen" : {
  381. "node_count" : 1,
  382. "index_count" : 0,
  383. "total_shard_count" : 0,
  384. "primary_shard_count" : 0,
  385. "doc_count" : 0,
  386. "total_size_bytes" : 0,
  387. "primary_size_bytes" : 0,
  388. "primary_shard_size_avg_bytes" : 0,
  389. "primary_shard_size_median_bytes" : 0,
  390. "primary_shard_size_mad_bytes" : 0
  391. },
  392. "data_cold" : {
  393. "node_count" : 0,
  394. "index_count" : 0,
  395. "total_shard_count" : 0,
  396. "primary_shard_count" : 0,
  397. "doc_count" : 0,
  398. "total_size_bytes" : 0,
  399. "primary_size_bytes" : 0,
  400. "primary_shard_size_avg_bytes" : 0,
  401. "primary_shard_size_median_bytes" : 0,
  402. "primary_shard_size_mad_bytes" : 0
  403. },
  404. "data_content" : {
  405. "node_count" : 0,
  406. "index_count" : 0,
  407. "total_shard_count" : 0,
  408. "primary_shard_count" : 0,
  409. "doc_count" : 0,
  410. "total_size_bytes" : 0,
  411. "primary_size_bytes" : 0,
  412. "primary_shard_size_avg_bytes" : 0,
  413. "primary_shard_size_median_bytes" : 0,
  414. "primary_shard_size_mad_bytes" : 0
  415. },
  416. "data_hot" : {
  417. "node_count" : 0,
  418. "index_count" : 0,
  419. "total_shard_count" : 0,
  420. "primary_shard_count" : 0,
  421. "doc_count" : 0,
  422. "total_size_bytes" : 0,
  423. "primary_size_bytes" : 0,
  424. "primary_shard_size_avg_bytes" : 0,
  425. "primary_shard_size_median_bytes" : 0,
  426. "primary_shard_size_mad_bytes" : 0
  427. }
  428. },
  429. "aggregate_metric" : {
  430. "available" : true,
  431. "enabled" : true
  432. },
  433. "archive" : {
  434. "available" : true,
  435. "enabled" : true,
  436. "indices_count" : 0
  437. },
  438. "health_api" : {
  439. "available" : true,
  440. "enabled" : true,
  441. "invocations": {
  442. "total": 0
  443. }
  444. },
  445. "remote_clusters": {
  446. "size": 0,
  447. "mode": {
  448. "proxy": 0,
  449. "sniff": 0
  450. },
  451. "security": {
  452. "cert": 0,
  453. "api_key": 0
  454. }
  455. },
  456. "enterprise_search" : {
  457. "available": true,
  458. "enabled": true,
  459. "search_applications" : {
  460. "count": 0
  461. },
  462. "analytics_collections": {
  463. "count": 0
  464. },
  465. "query_rulesets": {
  466. "total_rule_count": 0,
  467. "total_count": 0,
  468. "min_rule_count": 0,
  469. "max_rule_count": 0
  470. }
  471. },
  472. "universal_profiling" : {
  473. "available" : true,
  474. "enabled" : true
  475. },
  476. "logsdb": {
  477. "available": true,
  478. "enabled": false,
  479. "indices_count": 0,
  480. "indices_with_synthetic_source": 0,
  481. "num_docs": 0,
  482. "size_in_bytes": 0,
  483. "has_custom_cutoff_date": false
  484. }
  485. }