3

I was wondering how I can get the index size of one of my clusters.

I would like to know if I still have enough space on my cluster or if I will need to increase its size.

In a local instance of Solr, I am able to make the following request:

curl "http://localhost:8888/solr/admin/cores?action=STATUS&wt=json"

response:

{
  "responseHeader": {
    "status": 0,
    "QTime": 0
  },
  "initFailures": {},
  "status": {
    "gettingstarted_shard2_replica1": {
      "name": "gettingstarted_shard2_replica1",
      "instanceDir": "/Users/hacker/Documents/solr-5.3.1/example/cloud/node1/solr/gettingstarted_shard2_replica1/",
      "dataDir": "/Users/hacker/Documents/solr-5.3.1/example/cloud/node1/solr/gettingstarted_shard2_replica1/data/",
      "config": "solrconfig.xml",
      "schema": "managed-schema",
      "startTime": "2016-03-05T01:51:09.964Z",
      "uptime": 69420729,
      "index": {
        "numDocs": 0,
        "maxDoc": 0,
        "deletedDocs": 0,
        "indexHeapUsageBytes": 0,
        "version": 2,
        "segmentCount": 0,
        "current": true,
        "hasDeletions": false,
        "directory": "org.apache.lucene.store.NRTCachingDirectory:NRTCachingDirectory(MMapDirectory@/Users/user/Documents/solr-5.3.1/example/cloud/node1/solr/gettingstarted_shard2_replica1/data/index lockFactory=org.apache.lucene.store.NativeFSLockFactory@662d167e; maxCacheMB=48.0 maxMergeSizeMB=4.0)",
        "userData": {},
        "sizeInBytes": 71,
        "size": "71 bytes"
      }
    }
  }
}

But both action=STATUS and action=CLUSTERSTATUS are blocked by R&R (403 Forbidden response).

I could not find any insights of how I can accomplish this at the R&R documentation

Thanks

Pargles
  • 97
  • 2
  • 6

2 Answers2

2

This currently isn't supported yet; we block those specific administrative APIs, but we will soon be adding separate service-level statistics APIs that will give you insight into things like used disk space, RAM, etc. Once those are exposed I will update this answer with a pointer.

In the meantime, if you would like to get this information please open a support ticket and we'll be happy to get the information for you.


Update: See Greg's answer for the URI path.

Community
  • 1
  • 1
Scott
  • 56
  • 1
2

The Retrieve and Rank service now has a stats API to determine disk and memory usage. You can access it by sending a GET request to:

/v1/solr_clusters/{cluster-id}/stats
Greg
  • 36
  • 1