.. _stats: 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, :ref:`alter ` the Tarantool configuration file. .. rubric:: In this section: .. contents:: :local: .. _stat-list: List Galleries ---------------------------- To list all galleries on a shard, type in the address bar of your browser: .. code:: http:///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 request * ``total``: total number of galleries on the shard * ``galleries``: gallery list with the following data: * ``id``: gallery id * ``name``: gallery name * ``cnt_linear``: number of faces in the ``linear`` space (faces without fast index) * ``cnt_preindex``: number of faces in the ``preindex`` space (intermediate stage when creating fast index) * ``cnt_indexed``: number of faces in the ``indexed`` space (faces with fast index) .. rubric:: Example .. rubric:: Request .. code:: http://127.0.0.1:8001/stat/list/1/99 or curl http://127.0.0.1:8001/stat/list/1/99 \| jq .. rubric:: Response .. code:: 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: .. code:: http:///stat/info/:name ``:name`` is the gallery name. The response will feature JSON with the following fields: * ``id``: gallery id * ``name``: gallery name * ``cptr``: uint64_t address of the gallery object in the memory * ``cnt_linear``: number of faces in the ``linear`` space * ``cnt_preindex``: number of faces in the ``preindex`` space * ``cnt_preindex_deleted``: number of faces removed from the ``preindex`` space, which are physically still present in Tarantool * ``cnt_indexed``: number of faces in the ``indexed`` space * ``cnt_indexed_deleted``: number of faces removed from the ``indexed`` space, which are physically still present in Tarantool * ``index_file``: path to fast index file * ``index_loaded``: indicator of whether or not fast index is loaded .. rubric:: Example .. rubric:: Request .. code:: http://127.0.0.1:8001/stat/info/my_gal or curl http://127.0.0.1:8001/stat/info/my_gal | jq .. rubric:: Response .. code:: 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}