2012年11月27日 星期二

[elaticsearch]elasticsearch 了解 index stats

有時候想要看現在的 records 筆數與index size除了進去系統看實體index size外,
可直接使用 elastic search api。

$curl -XGET localhost:9200/_stat?pretty=true


{
"ok" : true,
"_shards" : {
"total" : 80,
"successful" : 78,
"failed" : 0
},
"_all" : {
"primaries" : {
"docs" : {
"count" : 51268,
"deleted" : 0
},
"store" : {
"size" : "47mb",
"size_in_bytes" : 49305337,
"throttle_time" : "0s",
"throttle_time_in_millis" : 0
},
"indexing" : {
"index_total" : 54374,
"index_time" : "1.7m",
"index_time_in_millis" : 104300,
"index_current" : 0,
"delete_total" : 0,
"delete_time" : "0s",
"delete_time_in_millis" : 0,
"delete_current" : 0
},
"get" : {
"total" : 0,
"time" : "0s",
"time_in_millis" : 0,
"exists_total" : 0,
"exists_time" : "0s",
"exists_time_in_millis" : 0,
"missing_total" : 0,
"missing_time" : "0s",
"missing_time_in_millis" : 0,
"current" : 0
},
"search" : {
"query_total" : 6463,
"query_time" : "17.5s",
"query_time_in_millis" : 17516,
"query_current" : 0,
"fetch_total" : 914,
"fetch_time" : "1.1s",
"fetch_time_in_millis" : 1113,
"fetch_current" : 0
}
},
"total" : {
"docs" : {
"count" : 104217,
"deleted" : 0
},
"store" : {
"size" : "572.4mb",
"size_in_bytes" : 600236519,
"throttle_time" : "0s",
"throttle_time_in_millis" : 0
},
"indexing" : {
"index_total" : 58856,
"index_time" : "3.6m",
"index_time_in_millis" : 220396,
"index_current" : 0,
"delete_total" : 0,
"delete_time" : "0s",
"delete_time_in_millis" : 0,
"delete_current" : 0
},
"get" : {
"total" : 0,
"time" : "0s",
"time_in_millis" : 0,
"exists_total" : 0,
"exists_time" : "0s",
"exists_time_in_millis" : 0,
"missing_total" : 0,
"missing_time" : "0s",
"missing_time_in_millis" : 0,
"current" : 0
},
"search" : {
"query_total" : 10459,
"query_time" : "27.5s",
"query_time_in_millis" : 27564,
"query_current" : 0,
"fetch_total" : 1324,
"fetch_time" : "1.6s",
"fetch_time_in_millis" : 1611,
"fetch_current" : 0
}
},

沒有留言:

張貼留言