Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Not A Problem
-
7.2
-
None
-
None
Description
The 'bin/solr status' command should optionally (so as not to break back compat) produce its outputs in pure JSON, for easier parsing, rather than a mixture of free text and JSON as it does at present.
e.g.
prompt# bin/solr status purejson
{{ {}}
# these two lines replace "Solr process xxxx on port yyyy"
{{ "solr_port":"8983",}}
{{ "solr_pid":"14020",}}
{{ "solr_home":"/home/user/solr-7.2.1/server/solr",}}
{{ "version":"7.2.1 b2b6438b37073bee1fca40374e85bf91aa457c0b - ubuntu - 2018-01-10 00:54:21",}}
{{ "startTime":"2018-05-02T13:51:43.388Z",}}
{{ "uptime":"5 days, 2 hours, 39 minutes, 35 seconds",}}
{{ "memory":"1.2 GB (%25.7) of 4.8 GB",}}
{{ "cloud":{}}
{{ "ZooKeeper":"localhost:9983",}}
{{ "liveNodes":"1",}}
{{ "collections":"1"}}}}
The use case here is mapping a solr port (where that is the only available information about the Solr instance) to ZK host/port(s) for a subsequent call to zkcli.sh.