使用 API

インストールされた X-Pack 機能に関する使用情報を提供します。

リクエスト

GET /_xpack/usage

前提条件

  • Elasticsearch のセキュリティ機能が有効になっている場合、この API を使用するには monitor または manage クラスター権限 が必要です。

説明

この API は、現在のライセンスの下で有効で利用可能な機能といくつかの使用統計に関する情報を提供します。

クエリパラメータ

  • master_timeout
  • (オプション、時間単位)マスターノードを待機する期間。タイムアウトが切れる前にマスターノードが利用できない場合、リクエストは失敗し、エラーを返します。デフォルトは 30s です。リクエストがタイムアウトしないことを示すために -1 に設定することもできます。

Python

  1. resp = client.xpack.usage()
  2. print(resp)

Ruby

  1. response = client.xpack.usage
  2. puts response

Js

  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. },
  154. "inference": {
  155. "available" : true,
  156. "enabled" : true,
  157. "models" : []
  158. },
  159. "logstash" : {
  160. "available" : true,
  161. "enabled" : true
  162. },
  163. "eql" : {
  164. "available" : true,
  165. "enabled" : true
  166. },
  167. "esql" : {
  168. "available" : true,
  169. "enabled" : true,
  170. "features" : {
  171. "eval" : 0,
  172. "stats" : 0,
  173. "dissect": 0,
  174. "grok" : 0,
  175. "limit" : 0,
  176. "where" : 0,
  177. "sort" : 0,
  178. "drop" : 0,
  179. "show" : 0,
  180. "rename" : 0,
  181. "mv_expand" : 0,
  182. "keep" : 0,
  183. "enrich" : 0,
  184. "from" : 0,
  185. "row" : 0,
  186. "meta" : 0
  187. },
  188. "queries" : {
  189. "rest" : {
  190. "total" : 0,
  191. "failed" : 0
  192. },
  193. "kibana" : {
  194. "total" : 0,
  195. "failed" : 0
  196. },
  197. "_all" : {
  198. "total" : 0,
  199. "failed" : 0
  200. }
  201. }
  202. },
  203. "sql" : {
  204. "available" : true,
  205. "enabled" : true,
  206. "features" : {
  207. "having" : 0,
  208. "subselect" : 0,
  209. "limit" : 0,
  210. "orderby" : 0,
  211. "where" : 0,
  212. "join" : 0,
  213. "groupby" : 0,
  214. "command" : 0,
  215. "local" : 0
  216. },
  217. "queries" : {
  218. "rest" : {
  219. "total" : 0,
  220. "paging" : 0,
  221. "failed" : 0
  222. },
  223. "cli" : {
  224. "total" : 0,
  225. "paging" : 0,
  226. "failed" : 0
  227. },
  228. "canvas" : {
  229. "total" : 0,
  230. "paging" : 0,
  231. "failed" : 0
  232. },
  233. "odbc" : {
  234. "total" : 0,
  235. "paging" : 0,
  236. "failed" : 0
  237. },
  238. "jdbc" : {
  239. "total" : 0,
  240. "paging" : 0,
  241. "failed" : 0
  242. },
  243. "odbc32" : {
  244. "total" : 0,
  245. "paging" : 0,
  246. "failed" : 0
  247. },
  248. "odbc64" : {
  249. "total" : 0,
  250. "paging" : 0,
  251. "failed" : 0
  252. },
  253. "_all" : {
  254. "total" : 0,
  255. "paging" : 0,
  256. "failed" : 0
  257. },
  258. "translate" : {
  259. "count" : 0
  260. }
  261. }
  262. },
  263. "rollup" : {
  264. "available" : true,
  265. "enabled" : true,
  266. ...
  267. },
  268. "ilm" : {
  269. "policy_count" : 3,
  270. "policy_stats" : [
  271. ...
  272. ]
  273. },
  274. "slm" : {
  275. "available" : true,
  276. "enabled" : true
  277. },
  278. "ccr" : {
  279. "available" : true,
  280. "enabled" : true,
  281. "follower_indices_count" : 0,
  282. "auto_follow_patterns_count" : 0
  283. },
  284. "transform" : {
  285. "available" : true,
  286. "enabled" : true
  287. },
  288. "voting_only" : {
  289. "available" : true,
  290. "enabled" : true
  291. },
  292. "searchable_snapshots" : {
  293. "available" : true,
  294. "enabled" : true,
  295. "indices_count" : 0,
  296. "full_copy_indices_count" : 0,
  297. "shared_cache_indices_count" : 0
  298. },
  299. "frozen_indices" : {
  300. "available" : true,
  301. "enabled" : true,
  302. "indices_count" : 0
  303. },
  304. "spatial" : {
  305. "available" : true,
  306. "enabled" : true
  307. },
  308. "analytics" : {
  309. "available" : true,
  310. "enabled" : true,
  311. "stats": {
  312. "boxplot_usage" : 0,
  313. "top_metrics_usage" : 0,
  314. "normalize_usage" : 0,
  315. "cumulative_cardinality_usage" : 0,
  316. "t_test_usage" : 0,
  317. "rate_usage" : 0,
  318. "string_stats_usage" : 0,
  319. "moving_percentiles_usage" : 0,
  320. "multi_terms_usage" : 0
  321. }
  322. },
  323. "data_streams" : {
  324. "available" : true,
  325. "enabled" : true,
  326. "data_streams" : 0,
  327. "indices_count" : 0
  328. },
  329. "data_lifecycle" : {
  330. "available": true,
  331. "enabled": true,
  332. "count": 0,
  333. "default_rollover_used": true,
  334. "retention": {
  335. "minimum_millis": 0,
  336. "maximum_millis": 0,
  337. "average_millis": 0.0
  338. }
  339. },
  340. "data_tiers" : {
  341. "available" : true,
  342. "enabled" : true,
  343. "data_warm" : {
  344. "node_count" : 0,
  345. "index_count" : 0,
  346. "total_shard_count" : 0,
  347. "primary_shard_count" : 0,
  348. "doc_count" : 0,
  349. "total_size_bytes" : 0,
  350. "primary_size_bytes" : 0,
  351. "primary_shard_size_avg_bytes" : 0,
  352. "primary_shard_size_median_bytes" : 0,
  353. "primary_shard_size_mad_bytes" : 0
  354. },
  355. "data_frozen" : {
  356. "node_count" : 1,
  357. "index_count" : 0,
  358. "total_shard_count" : 0,
  359. "primary_shard_count" : 0,
  360. "doc_count" : 0,
  361. "total_size_bytes" : 0,
  362. "primary_size_bytes" : 0,
  363. "primary_shard_size_avg_bytes" : 0,
  364. "primary_shard_size_median_bytes" : 0,
  365. "primary_shard_size_mad_bytes" : 0
  366. },
  367. "data_cold" : {
  368. "node_count" : 0,
  369. "index_count" : 0,
  370. "total_shard_count" : 0,
  371. "primary_shard_count" : 0,
  372. "doc_count" : 0,
  373. "total_size_bytes" : 0,
  374. "primary_size_bytes" : 0,
  375. "primary_shard_size_avg_bytes" : 0,
  376. "primary_shard_size_median_bytes" : 0,
  377. "primary_shard_size_mad_bytes" : 0
  378. },
  379. "data_content" : {
  380. "node_count" : 0,
  381. "index_count" : 0,
  382. "total_shard_count" : 0,
  383. "primary_shard_count" : 0,
  384. "doc_count" : 0,
  385. "total_size_bytes" : 0,
  386. "primary_size_bytes" : 0,
  387. "primary_shard_size_avg_bytes" : 0,
  388. "primary_shard_size_median_bytes" : 0,
  389. "primary_shard_size_mad_bytes" : 0
  390. },
  391. "data_hot" : {
  392. "node_count" : 0,
  393. "index_count" : 0,
  394. "total_shard_count" : 0,
  395. "primary_shard_count" : 0,
  396. "doc_count" : 0,
  397. "total_size_bytes" : 0,
  398. "primary_size_bytes" : 0,
  399. "primary_shard_size_avg_bytes" : 0,
  400. "primary_shard_size_median_bytes" : 0,
  401. "primary_shard_size_mad_bytes" : 0
  402. }
  403. },
  404. "aggregate_metric" : {
  405. "available" : true,
  406. "enabled" : true
  407. },
  408. "archive" : {
  409. "available" : true,
  410. "enabled" : true,
  411. "indices_count" : 0
  412. },
  413. "health_api" : {
  414. "available" : true,
  415. "enabled" : true,
  416. "invocations": {
  417. "total": 0
  418. }
  419. },
  420. "remote_clusters": {
  421. "size": 0,
  422. "mode": {
  423. "proxy": 0,
  424. "sniff": 0
  425. },
  426. "security": {
  427. "cert": 0,
  428. "api_key": 0
  429. }
  430. },
  431. "enterprise_search" : {
  432. "available": true,
  433. "enabled": true,
  434. "search_applications" : {
  435. "count": 0
  436. },
  437. "analytics_collections": {
  438. "count": 0
  439. },
  440. "query_rulesets": {
  441. "total_rule_count": 0,
  442. "total_count": 0,
  443. "min_rule_count": 0,
  444. "max_rule_count": 0
  445. }
  446. },
  447. "universal_profiling" : {
  448. "available" : true,
  449. "enabled" : true
  450. }
  451. }