Better CLI status for Apache Solr

solr

Our team have some Apache Solr servers in two clusters. But WebUI is for us realy cluttering, when you have more collections and shards.

As you can see, this is not realy useful.

solr-graph

So I wrote script for monitor state of solr cluster. This script get information from API and show it in table (script use tabulate). You can see it on my github

PS: I dont know yet if state recovery failed is in /solr/admin/collections?action=clusterstatus (but gone state is in API as down :-( ). So we will see...

Enjoy. Next i will write about bad default balance policy in Solr.

solr-status

sksolr1.ng(sksolr1.ng):~ # solr-status -H sksolr1.ko.seznam.cz
+---------+-----------+-------+----------+--------------+--------+-------------------+
| server  |   leaders |   all |   active |   recovering |   down |   recovery failed |
+=========+===========+=======+==========+==============+========+===================+
| sksolr1 |       110 |   219 |      219 |            0 |      0 |                 0 |
+---------+-----------+-------+----------+--------------+--------+-------------------+
| sksolr2 |       111 |   219 |      219 |            0 |      0 |                 0 |
+---------+-----------+-------+----------+--------------+--------+-------------------+
| sksolr3 |       110 |   222 |      222 |            0 |      0 |                 0 |
+---------+-----------+-------+----------+--------------+--------+-------------------+
| sksolr4 |       110 |   222 |      222 |            0 |      0 |                 0 |
+---------+-----------+-------+----------+--------------+--------+-------------------+
| sksolr5 |       109 |   221 |      221 |            0 |      0 |                 0 |
+---------+-----------+-------+----------+--------------+--------+-------------------+
| sksolr6 |       110 |   220 |      220 |            0 |      0 |                 0 |
+---------+-----------+-------+----------+--------------+--------+-------------------+
| sksolr7 |       110 |   219 |      219 |            0 |      0 |                 0 |
+---------+-----------+-------+----------+--------------+--------+-------------------+
| sksolr8 |       110 |   218 |      218 |            0 |      0 |                 0 |
+---------+-----------+-------+----------+--------------+--------+-------------------+

countshards  = 880
countleaders = 880