Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-12327

'bin/solr status' should be able to produce output as pure JSON

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Not A Problem
    • 7.2
    • None
    • scripts and tools
    • 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.

       

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            simon.rosenthal Simon Rosenthal
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: