Shard Galleries Statistics¶
You can get a shard galleries statistics and other data right in your browser. This functionality can be harnessed in monitoring systems.
Note
In the case of the standalone deployment, you can access Tarantool by default only locally (127.0.0.1
). If you want to access Tarantool remotely, alter the Tarantool configuration file.
In this section:
List Galleries¶
To list all galleries on a shard, type in the address bar of your browser:
http://<tarantool_host_ip:shard_port>/stat/list/:start/:limit
:start
is the number of a gallery the list starts with.:limit
is the maximum number of galleries in the list.The response will feature JSON with the following fields:
next
: pagination cursor to retrieve the next page with results, pass it as :start_id in the following requesttotal
: total number of galleries on the shardgalleries
: gallery list with the following data: *id
: gallery id *name
: gallery name *cnt_linear
: number of faces in thelinear
space (faces without fast index) *cnt_preindex
: number of faces in thepreindex
space (intermediate stage when creating fast index) *cnt_indexed
: number of faces in theindexed
space (faces with fast index)
Example
Request
http://127.0.0.1:8001/stat/list/1/99
or
curl http://127.0.0.1:8001/stat/list/1/99 \| jq
Response
HTTP/1.1 200 Ok
Content-length: 170
Server: Tarantool http (tarantool v1.7.3-673-g23cc4dc)
Connection: keep-alive
{"next":3,"galleries":[{"cnt_indexed":3,"id":1,"cnt_preindex":0,"name":"a","cnt_linear":0},{"cnt_indexed":1,"id":2,"cnt_preindex":0,"name":"b","cnt_linear":1}],"total":5}
Get Gallery Information¶
To get a gallery information, type in the address bar of your browser:
http://<tarantool_host_ip:shard_port>/stat/info/:name
:name
is the gallery name.
The response will feature JSON with the following fields:
id
: gallery idname
: gallery namecptr
: uint64_t address of the gallery object in the memorycnt_linear
: number of faces in thelinear
spacecnt_preindex
: number of faces in thepreindex
spacecnt_preindex_deleted
: number of faces removed from thepreindex
space, which are physically still present in Tarantoolcnt_indexed
: number of faces in theindexed
spacecnt_indexed_deleted
: number of faces removed from theindexed
space, which are physically still present in Tarantoolindex_file
: path to fast index fileindex_loaded
: indicator of whether or not fast index is loaded
Example
Request
http://127.0.0.1:8001/stat/info/my_gal
or
curl http://127.0.0.1:8001/stat/info/my_gal | jq
Response
HTTP/1.1 200 Ok
Content-length: 196
Server: Tarantool http (tarantool v1.7.3-673-g23cc4dc)
Connection: keep-alive
{"cnt_indexed":2464344,"cnt_preindex_deleted":139,"index_file":"none","index_loaded":false,"cnt_preindex":8310,"cnt_linear":959,"cptr":29253696,"id":1,"name":"my_gal","cnt_indexed_deleted":78811}