使用 API
インストールされた X-Pack 機能に関する使用情報を提供します。
リクエスト
GET /_xpack/usage
前提条件
- Elasticsearch のセキュリティ機能が有効になっている場合、この API を使用するには
monitor
またはmanage
クラスター権限 が必要です。
説明
この API は、現在のライセンスの下で有効で利用可能な機能といくつかの使用統計に関する情報を提供します。
クエリパラメータ
master_timeout
- (オプション、時間単位)マスターノードを待機する期間。タイムアウトが切れる前にマスターノードが利用できない場合、リクエストは失敗し、エラーを返します。デフォルトは
30s
です。リクエストがタイムアウトしないことを示すために-1
に設定することもできます。
例
Python
resp = client.xpack.usage()
print(resp)
Ruby
response = client.xpack.usage
puts response
Js
const response = await client.xpack.usage();
console.log(response);
コンソール
GET /_xpack/usage
コンソール-結果
{
"security" : {
"available" : true,
"enabled" : true,
...
},
"monitoring" : {
"available" : true,
"enabled" : true,
"collection_enabled" : false,
"enabled_exporters" : {
"local" : 1
}
},
"watcher" : {
"available" : true,
"enabled" : true,
"execution" : {
"actions" : {
"_all" : {
"total" : 0,
"total_time_in_ms" : 0
}
}
},
"watch" : {
"input" : {
"_all" : {
"total" : 0,
"active" : 0
}
},
"trigger" : {
"_all" : {
"total" : 0,
"active" : 0
}
}
},
"count" : {
"total" : 0,
"active" : 0
}
},
"graph" : {
"available" : true,
"enabled" : true
},
"ml" : {
"available" : true,
"enabled" : true,
"jobs" : {
"_all" : {
"count" : 0,
"detectors" : {
...
},
"created_by" : { },
"model_size" : {
...
},
"forecasts" : {
"total" : 0,
"forecasted_jobs" : 0
}
}
},
"datafeeds" : {
"_all" : {
"count" : 0
}
},
"data_frame_analytics_jobs" : {
"_all" : {
"count" : 0
},
"analysis_counts": { },
"memory_usage": {
"peak_usage_bytes": {
"min": 0.0,
"max": 0.0,
"avg": 0.0,
"total": 0.0
}
}
},
"inference" : {
"ingest_processors" : {
"_all" : {
"num_docs_processed" : {
"max" : 0,
"sum" : 0,
"min" : 0
},
"pipelines" : {
"count" : 0
},
"num_failures" : {
"max" : 0,
"sum" : 0,
"min" : 0
},
"time_ms" : {
"max" : 0,
"sum" : 0,
"min" : 0
}
}
},
"trained_models" : {
"_all" : {
"count": 1
},
"count": {
"total": 1,
"prepackaged": 1,
"other": 0
},
"model_size_bytes": {
"min": 0.0,
"max": 0.0,
"avg": 0.0,
"total": 0.0
},
"estimated_operations": {
"min": 0.0,
"max": 0.0,
"avg": 0.0,
"total": 0.0
}
},
"deployments": {
"count": 0,
"inference_counts": {
"total": 0.0,
"min": 0.0,
"avg": 0.0,
"max": 0.0
},
"stats_by_model": [],
"model_sizes_bytes": {
"total": 0.0,
"min": 0.0,
"avg": 0.0,
"max": 0.0
},
"time_ms": {
"avg": 0.0
}
}
},
"node_count" : 1
},
"inference": {
"available" : true,
"enabled" : true,
"models" : []
},
"logstash" : {
"available" : true,
"enabled" : true
},
"eql" : {
"available" : true,
"enabled" : true
},
"esql" : {
"available" : true,
"enabled" : true,
"features" : {
"eval" : 0,
"stats" : 0,
"dissect": 0,
"grok" : 0,
"limit" : 0,
"where" : 0,
"sort" : 0,
"drop" : 0,
"show" : 0,
"rename" : 0,
"mv_expand" : 0,
"keep" : 0,
"enrich" : 0,
"from" : 0,
"row" : 0,
"meta" : 0
},
"queries" : {
"rest" : {
"total" : 0,
"failed" : 0
},
"kibana" : {
"total" : 0,
"failed" : 0
},
"_all" : {
"total" : 0,
"failed" : 0
}
}
},
"sql" : {
"available" : true,
"enabled" : true,
"features" : {
"having" : 0,
"subselect" : 0,
"limit" : 0,
"orderby" : 0,
"where" : 0,
"join" : 0,
"groupby" : 0,
"command" : 0,
"local" : 0
},
"queries" : {
"rest" : {
"total" : 0,
"paging" : 0,
"failed" : 0
},
"cli" : {
"total" : 0,
"paging" : 0,
"failed" : 0
},
"canvas" : {
"total" : 0,
"paging" : 0,
"failed" : 0
},
"odbc" : {
"total" : 0,
"paging" : 0,
"failed" : 0
},
"jdbc" : {
"total" : 0,
"paging" : 0,
"failed" : 0
},
"odbc32" : {
"total" : 0,
"paging" : 0,
"failed" : 0
},
"odbc64" : {
"total" : 0,
"paging" : 0,
"failed" : 0
},
"_all" : {
"total" : 0,
"paging" : 0,
"failed" : 0
},
"translate" : {
"count" : 0
}
}
},
"rollup" : {
"available" : true,
"enabled" : true,
...
},
"ilm" : {
"policy_count" : 3,
"policy_stats" : [
...
]
},
"slm" : {
"available" : true,
"enabled" : true
},
"ccr" : {
"available" : true,
"enabled" : true,
"follower_indices_count" : 0,
"auto_follow_patterns_count" : 0
},
"transform" : {
"available" : true,
"enabled" : true
},
"voting_only" : {
"available" : true,
"enabled" : true
},
"searchable_snapshots" : {
"available" : true,
"enabled" : true,
"indices_count" : 0,
"full_copy_indices_count" : 0,
"shared_cache_indices_count" : 0
},
"frozen_indices" : {
"available" : true,
"enabled" : true,
"indices_count" : 0
},
"spatial" : {
"available" : true,
"enabled" : true
},
"analytics" : {
"available" : true,
"enabled" : true,
"stats": {
"boxplot_usage" : 0,
"top_metrics_usage" : 0,
"normalize_usage" : 0,
"cumulative_cardinality_usage" : 0,
"t_test_usage" : 0,
"rate_usage" : 0,
"string_stats_usage" : 0,
"moving_percentiles_usage" : 0,
"multi_terms_usage" : 0
}
},
"data_streams" : {
"available" : true,
"enabled" : true,
"data_streams" : 0,
"indices_count" : 0
},
"data_lifecycle" : {
"available": true,
"enabled": true,
"count": 0,
"default_rollover_used": true,
"retention": {
"minimum_millis": 0,
"maximum_millis": 0,
"average_millis": 0.0
}
},
"data_tiers" : {
"available" : true,
"enabled" : true,
"data_warm" : {
"node_count" : 0,
"index_count" : 0,
"total_shard_count" : 0,
"primary_shard_count" : 0,
"doc_count" : 0,
"total_size_bytes" : 0,
"primary_size_bytes" : 0,
"primary_shard_size_avg_bytes" : 0,
"primary_shard_size_median_bytes" : 0,
"primary_shard_size_mad_bytes" : 0
},
"data_frozen" : {
"node_count" : 1,
"index_count" : 0,
"total_shard_count" : 0,
"primary_shard_count" : 0,
"doc_count" : 0,
"total_size_bytes" : 0,
"primary_size_bytes" : 0,
"primary_shard_size_avg_bytes" : 0,
"primary_shard_size_median_bytes" : 0,
"primary_shard_size_mad_bytes" : 0
},
"data_cold" : {
"node_count" : 0,
"index_count" : 0,
"total_shard_count" : 0,
"primary_shard_count" : 0,
"doc_count" : 0,
"total_size_bytes" : 0,
"primary_size_bytes" : 0,
"primary_shard_size_avg_bytes" : 0,
"primary_shard_size_median_bytes" : 0,
"primary_shard_size_mad_bytes" : 0
},
"data_content" : {
"node_count" : 0,
"index_count" : 0,
"total_shard_count" : 0,
"primary_shard_count" : 0,
"doc_count" : 0,
"total_size_bytes" : 0,
"primary_size_bytes" : 0,
"primary_shard_size_avg_bytes" : 0,
"primary_shard_size_median_bytes" : 0,
"primary_shard_size_mad_bytes" : 0
},
"data_hot" : {
"node_count" : 0,
"index_count" : 0,
"total_shard_count" : 0,
"primary_shard_count" : 0,
"doc_count" : 0,
"total_size_bytes" : 0,
"primary_size_bytes" : 0,
"primary_shard_size_avg_bytes" : 0,
"primary_shard_size_median_bytes" : 0,
"primary_shard_size_mad_bytes" : 0
}
},
"aggregate_metric" : {
"available" : true,
"enabled" : true
},
"archive" : {
"available" : true,
"enabled" : true,
"indices_count" : 0
},
"health_api" : {
"available" : true,
"enabled" : true,
"invocations": {
"total": 0
}
},
"remote_clusters": {
"size": 0,
"mode": {
"proxy": 0,
"sniff": 0
},
"security": {
"cert": 0,
"api_key": 0
}
},
"enterprise_search" : {
"available": true,
"enabled": true,
"search_applications" : {
"count": 0
},
"analytics_collections": {
"count": 0
},
"query_rulesets": {
"total_rule_count": 0,
"total_count": 0,
"min_rule_count": 0,
"max_rule_count": 0
}
},
"universal_profiling" : {
"available" : true,
"enabled" : true
}
}