인덱스 통계를 보려면 _stats 또는 인덱스이름/_stats를 사용하면 된다.
https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-stats.html
curl localhost:9200/wikinews/_stats?pretty=true
{
"_shards" : {
"total" : 10,
"successful" : 5,
"failed" : 0
},
"_all" : {
"primaries" : {
"docs" : {
"count" : 21067,
"deleted" : 0
},
"store" : {
"size_in_bytes" : 373355243,
"throttle_time_in_millis" : 0
},
"indexing" : {
"index_total" : 42134,
"index_time_in_millis" : 110295,
"index_current" : 0,
"index_failed" : 0,
"delete_total" : 0,
"delete_time_in_millis" : 0,
"delete_current" : 0,
"noop_update_total" : 0,
"is_throttled" : false,
"throttle_time_in_millis" : 0
},
"get" : {
"total" : 0,
"time_in_millis" : 0,
"exists_total" : 0,
"exists_time_in_millis" : 0,
"missing_total" : 0,
"missing_time_in_millis" : 0,
"current" : 0
},
"search" : {
"open_contexts" : 0,
"query_total" : 0,
"query_time_in_millis" : 0,
"query_current" : 0,
"fetch_total" : 0,
"fetch_time_in_millis" : 0,
"fetch_current" : 0,
"scroll_total" : 0,
"scroll_time_in_millis" : 0,
"scroll_current" : 0,
"suggest_total" : 0,
"suggest_time_in_millis" : 0,
"suggest_current" : 0
},
"merges" : {
"current" : 0,
"current_docs" : 0,
"current_size_in_bytes" : 0,
"total" : 0,
"total_time_in_millis" : 0,
"total_docs" : 0,
"total_size_in_bytes" : 0,
"total_stopped_time_in_millis" : 0,
"total_throttled_time_in_millis" : 0,
"total_auto_throttle_in_bytes" : 104857600
},
"refresh" : {
"total" : 59,
"total_time_in_millis" : 30946,
"listeners" : 0
},
"flush" : {
"total" : 10,
"total_time_in_millis" : 284
},
"warmer" : {
"current" : 0,
"total" : 74,
"total_time_in_millis" : 18
},
"query_cache" : {
"memory_size_in_bytes" : 0,
"total_count" : 0,
"hit_count" : 0,
"miss_count" : 0,
"cache_size" : 0,
"cache_count" : 0,
"evictions" : 0
},
"fielddata" : {
"memory_size_in_bytes" : 0,
"evictions" : 0
},
"completion" : {
"size_in_bytes" : 0
},
"segments" : {
"count" : 24,
"memory_in_bytes" : 1619215,
"terms_memory_in_bytes" : 1435245,
"stored_fields_memory_in_bytes" : 42880,
"term_vectors_memory_in_bytes" : 0,
"norms_memory_in_bytes" : 26112,
"points_memory_in_bytes" : 1106,
"doc_values_memory_in_bytes" : 113872,
"index_writer_memory_in_bytes" : 0,
"version_map_memory_in_bytes" : 0,
"fixed_bit_set_memory_in_bytes" : 0,
"max_unsafe_auto_id_timestamp" : -1,
"file_sizes" : { }
},
"translog" : {
"operations" : 0,
"size_in_bytes" : 215
},
"request_cache" : {
"memory_size_in_bytes" : 0,
"evictions" : 0,
"hit_count" : 0,
"miss_count" : 0
},
"recovery" : {
"current_as_source" : 0,
"current_as_target" : 0,
"throttle_time_in_millis" : 0
}
},
"total" : {
"docs" : {
"count" : 21067,
"deleted" : 0
},
"store" : {
"size_in_bytes" : 373355243,
"throttle_time_in_millis" : 0
},
"indexing" : {
"index_total" : 42134,
"index_time_in_millis" : 110295,
"index_current" : 0,
"index_failed" : 0,
"delete_total" : 0,
"delete_time_in_millis" : 0,
"delete_current" : 0,
"noop_update_total" : 0,
"is_throttled" : false,
"throttle_time_in_millis" : 0
},
"get" : {
"total" : 0,
"time_in_millis" : 0,
"exists_total" : 0,
"exists_time_in_millis" : 0,
"missing_total" : 0,
"missing_time_in_millis" : 0,
"current" : 0
},
"search" : {
"open_contexts" : 0,
"query_total" : 0,
"query_time_in_millis" : 0,
"query_current" : 0,
"fetch_total" : 0,
"fetch_time_in_millis" : 0,
"fetch_current" : 0,
"scroll_total" : 0,
"scroll_time_in_millis" : 0,
"scroll_current" : 0,
"suggest_total" : 0,
"suggest_time_in_millis" : 0,
"suggest_current" : 0
},
"merges" : {
"current" : 0,
"current_docs" : 0,
"current_size_in_bytes" : 0,
"total" : 0,
"total_time_in_millis" : 0,
"total_docs" : 0,
"total_size_in_bytes" : 0,
"total_stopped_time_in_millis" : 0,
"total_throttled_time_in_millis" : 0,
"total_auto_throttle_in_bytes" : 104857600
},
"refresh" : {
"total" : 59,
"total_time_in_millis" : 30946,
"listeners" : 0
},
"flush" : {
"total" : 10,
"total_time_in_millis" : 284
},
"warmer" : {
"current" : 0,
"total" : 74,
"total_time_in_millis" : 18
},
"query_cache" : {
"memory_size_in_bytes" : 0,
"total_count" : 0,
"hit_count" : 0,
"miss_count" : 0,
"cache_size" : 0,
"cache_count" : 0,
"evictions" : 0
},
"fielddata" : {
"memory_size_in_bytes" : 0,
"evictions" : 0
},
"completion" : {
"size_in_bytes" : 0
},
"segments" : {
"count" : 24,
"memory_in_bytes" : 1619215,
"terms_memory_in_bytes" : 1435245,
"stored_fields_memory_in_bytes" : 42880,
"term_vectors_memory_in_bytes" : 0,
"norms_memory_in_bytes" : 26112,
"points_memory_in_bytes" : 1106,
"doc_values_memory_in_bytes" : 113872,
"index_writer_memory_in_bytes" : 0,
"version_map_memory_in_bytes" : 0,
"fixed_bit_set_memory_in_bytes" : 0,
"max_unsafe_auto_id_timestamp" : -1,
"file_sizes" : { }
},
"translog" : {
"operations" : 0,
"size_in_bytes" : 215
},
"request_cache" : {
"memory_size_in_bytes" : 0,
"evictions" : 0,
"hit_count" : 0,
"miss_count" : 0
},
"recovery" : {
"current_as_source" : 0,
"current_as_target" : 0,
"throttle_time_in_millis" : 0
}
}
},
"indices" : {
"wikinews" : {
"primaries" : {
"docs" : {
"count" : 21067,
"deleted" : 0
},
"store" : {
"size_in_bytes" : 373355243,
"throttle_time_in_millis" : 0
},
"indexing" : {
"index_total" : 42134,
"index_time_in_millis" : 110295,
"index_current" : 0,
"index_failed" : 0,
"delete_total" : 0,
"delete_time_in_millis" : 0,
"delete_current" : 0,
"noop_update_total" : 0,
"is_throttled" : false,
"throttle_time_in_millis" : 0
},
"get" : {
"total" : 0,
"time_in_millis" : 0,
"exists_total" : 0,
"exists_time_in_millis" : 0,
"missing_total" : 0,
"missing_time_in_millis" : 0,
"current" : 0
},
"search" : {
"open_contexts" : 0,
"query_total" : 0,
"query_time_in_millis" : 0,
"query_current" : 0,
"fetch_total" : 0,
"fetch_time_in_millis" : 0,
"fetch_current" : 0,
"scroll_total" : 0,
"scroll_time_in_millis" : 0,
"scroll_current" : 0,
"suggest_total" : 0,
"suggest_time_in_millis" : 0,
"suggest_current" : 0
},
"merges" : {
"current" : 0,
"current_docs" : 0,
"current_size_in_bytes" : 0,
"total" : 0,
"total_time_in_millis" : 0,
"total_docs" : 0,
"total_size_in_bytes" : 0,
"total_stopped_time_in_millis" : 0,
"total_throttled_time_in_millis" : 0,
"total_auto_throttle_in_bytes" : 104857600
},
"refresh" : {
"total" : 59,
"total_time_in_millis" : 30946,
"listeners" : 0
},
"flush" : {
"total" : 10,
"total_time_in_millis" : 284
},
"warmer" : {
"current" : 0,
"total" : 74,
"total_time_in_millis" : 18
},
"query_cache" : {
"memory_size_in_bytes" : 0,
"total_count" : 0,
"hit_count" : 0,
"miss_count" : 0,
"cache_size" : 0,
"cache_count" : 0,
"evictions" : 0
},
"fielddata" : {
"memory_size_in_bytes" : 0,
"evictions" : 0
},
"completion" : {
"size_in_bytes" : 0
},
"segments" : {
"count" : 24,
"memory_in_bytes" : 1619215,
"terms_memory_in_bytes" : 1435245,
"stored_fields_memory_in_bytes" : 42880,
"term_vectors_memory_in_bytes" : 0,
"norms_memory_in_bytes" : 26112,
"points_memory_in_bytes" : 1106,
"doc_values_memory_in_bytes" : 113872,
"index_writer_memory_in_bytes" : 0,
"version_map_memory_in_bytes" : 0,
"fixed_bit_set_memory_in_bytes" : 0,
"max_unsafe_auto_id_timestamp" : -1,
"file_sizes" : { }
},
"translog" : {
"operations" : 0,
"size_in_bytes" : 215
},
"request_cache" : {
"memory_size_in_bytes" : 0,
"evictions" : 0,
"hit_count" : 0,
"miss_count" : 0
},
"recovery" : {
"current_as_source" : 0,
"current_as_target" : 0,
"throttle_time_in_millis" : 0
}
},
"total" : {
"docs" : {
"count" : 21067,
"deleted" : 0
},
"store" : {
"size_in_bytes" : 373355243,
"throttle_time_in_millis" : 0
},
"indexing" : {
"index_total" : 42134,
"index_time_in_millis" : 110295,
"index_current" : 0,
"index_failed" : 0,
"delete_total" : 0,
"delete_time_in_millis" : 0,
"delete_current" : 0,
"noop_update_total" : 0,
"is_throttled" : false,
"throttle_time_in_millis" : 0
},
"get" : {
"total" : 0,
"time_in_millis" : 0,
"exists_total" : 0,
"exists_time_in_millis" : 0,
"missing_total" : 0,
"missing_time_in_millis" : 0,
"current" : 0
},
"search" : {
"open_contexts" : 0,
"query_total" : 0,
"query_time_in_millis" : 0,
"query_current" : 0,
"fetch_total" : 0,
"fetch_time_in_millis" : 0,
"fetch_current" : 0,
"scroll_total" : 0,
"scroll_time_in_millis" : 0,
"scroll_current" : 0,
"suggest_total" : 0,
"suggest_time_in_millis" : 0,
"suggest_current" : 0
},
"merges" : {
"current" : 0,
"current_docs" : 0,
"current_size_in_bytes" : 0,
"total" : 0,
"total_time_in_millis" : 0,
"total_docs" : 0,
"total_size_in_bytes" : 0,
"total_stopped_time_in_millis" : 0,
"total_throttled_time_in_millis" : 0,
"total_auto_throttle_in_bytes" : 104857600
},
"refresh" : {
"total" : 59,
"total_time_in_millis" : 30946,
"listeners" : 0
},
"flush" : {
"total" : 10,
"total_time_in_millis" : 284
},
"warmer" : {
"current" : 0,
"total" : 74,
"total_time_in_millis" : 18
},
"query_cache" : {
"memory_size_in_bytes" : 0,
"total_count" : 0,
"hit_count" : 0,
"miss_count" : 0,
"cache_size" : 0,
"cache_count" : 0,
"evictions" : 0
},
"fielddata" : {
"memory_size_in_bytes" : 0,
"evictions" : 0
},
"completion" : {
"size_in_bytes" : 0
},
"segments" : {
"count" : 24,
"memory_in_bytes" : 1619215,
"terms_memory_in_bytes" : 1435245,
"stored_fields_memory_in_bytes" : 42880,
"term_vectors_memory_in_bytes" : 0,
"norms_memory_in_bytes" : 26112,
"points_memory_in_bytes" : 1106,
"doc_values_memory_in_bytes" : 113872,
"index_writer_memory_in_bytes" : 0,
"version_map_memory_in_bytes" : 0,
"fixed_bit_set_memory_in_bytes" : 0,
"max_unsafe_auto_id_timestamp" : -1,
"file_sizes" : { }
},
"translog" : {
"operations" : 0,
"size_in_bytes" : 215
},
"request_cache" : {
"memory_size_in_bytes" : 0,
"evictions" : 0,
"hit_count" : 0,
"miss_count" : 0
},
"recovery" : {
"current_as_source" : 0,
"current_as_target" : 0,
"throttle_time_in_millis" : 0
}
}
}
}
}
만약 다큐먼트 개수만 보고 싶다면 _stats/docs를 호출하면 된다.
curl localhost:9200/wikinews/_stats/docs?pretty=true
{
"_shards" : {
"total" : 10,
"successful" : 5,
"failed" : 0
},
"_all" : {
"primaries" : {
"docs" : {
"count" : 21067,
"deleted" : 0
}
},
"total" : {
"docs" : {
"count" : 21067,
"deleted" : 0
}
}
},
"indices" : {
"wikinews" : {
"primaries" : {
"docs" : {
"count" : 21067,
"deleted" : 0
}
},
"total" : {
"docs" : {
"count" : 21067,
"deleted" : 0
}
}
}
}
}
'Elasticsearch' 카테고리의 다른 글
[elasticsearch 5] bootstrap 검사 (0) | 2017.05.22 |
---|---|
[elasticsearch 5] _cat/shards (0) | 2017.05.20 |
[elasticsearch 5] 매트릭스 통계(matrix stats) (0) | 2017.05.17 |
[elasticsearch 5] 파이프라인 집계 (0) | 2017.05.17 |
[elasticsearch5] max_map_count 설정 (0) | 2017.04.26 |