Closed
Description
For the faiss feature, we need to add stats to the stats API. This addition should not break any backwards compatibility. The proposed additional stats will be:
Node Stats
- training.requests: number of training requests
- training.errors: number of training request errors
- training.memory_usage: memory usage used by training in kb
- training.memory_usage_percentage: memory usage used by training as percentage
- training.jobs: job level training stats
- model.indexing_degraded: whether indexing from models is degraded. This is true when the model cache is experiencing capacity misses
- engine.faiss_in_use: Whether faiss is in use on the node in the last 12 hours
- engine.nmslib_in_use: Whether nmslib is in use on the node in the last 12 hours
Cluster Stats
- model.index_status: k-NN model index status
The API response will look like:
{
"_nodes" : {
"total" : 1,
"successful" : 1,
"failed" : 0
},
"cluster_name" : "_run",
"circuit_breaker_triggered" : false,
"model": {
"index_status": "green|yellow|red|non-existant",
},
"nodes" : {
"HYMrXXsBSamUkcAjhjeN0w" : {
"cache_capacity_reached" : false,
"eviction_count" : 0,
"hit_count" : 0,
"miss_count" : 1,
"knn_query_requests" : 4,
"graph_memory_usage" : 1,
"graph_memory_usage_percentage" : 3.68,
"graph_index_requests" : 7,
"graph_index_errors" : 1,
"graph_query_requests" : 30,
"graph_query_errors" : 15,
"indices_in_cache" : {
"myindex" : {
"graph_memory_usage" : 2,
"graph_memory_usage_percentage" : 3.68,
"graph_count" : 2
}
},
"training": {
"requests": X,
"errors": X,
"memory_usage" : 2,
"memory_usage_percentage" : 3.68
"jobs": {
"my_model_id" : {
"memory_usage" : 2,
"memory_usage_percentage" : 3.68
}
},
},
"model": {
"indexing_degraded": true,
},
"engine": {
"nmslib_in_use": false,
"faiss_in_use": true,
},
"load_exception_count" : 0,
"load_success_count" : 1,
"total_load_time" : 2878745,
"script_compilations" : 1,
"script_compilation_errors" : 0,
"script_query_requests" : 534,
"script_query_errors" : 0
}
}
}