Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-9735 Umbrella JIRA for Auto Scaling and Cluster Management in SolrCloud
  3. SOLR-10677

Expose a diagnostics API to return nodes sorted by load in descending order and any policy violations

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 7.0
    • SolrCloud

    Description

      Expose a diagnostics API to gives details of how loaded each node is, according to the configured cluster policy and preferences as well as a list of violations for rules given in the policies.

      By adding /diagnostics to the /admin/autoscaling path (for v1 API) or /cluster/autoscaling path (for v2 API), the API returns the list of nodes in sorted order according to the cluster preferences configured.

      API v1:

      curl http://localhost:8983/solr/admin/autoscaling/diagnostics
      

      or API v2:

      http://localhost:8983/v2/cluster/autoscaling/diagnostics
      
      {
        "responseHeader":{
          "status":0,
          "QTime":30},
        "cluster-policy":[{
            "cores":"<10",
            "node":"#ANY"},
          {
            "replica":"<2",
            "shard":"#EACH",
            "node":"#ANY"},
          {
            "nodeRole":"!overseer",
            "replica":"#ANY"}],
        "cluster-preferences":[{
            "minimize":"cores",
            "precision":3},
          {
            "maximize":"freedisk",
            "precision":100},
          {
            "minimize":"sysLoadAvg",
            "precision":10},
          {
            "minimize":"heapUsage",
            "precision":10}],
        "diagnostics":{
          "sortedNodes":[{
              "node":"127.0.1.1:8983_solr",
              "cores":2,
              "freedisk":69.68052673339844,
              "sysLoadAvg":77.0,
              "heapUsage":17.253869804602918},
            {
              "node":"127.0.1.1:7574_solr",
              "cores":2,
              "freedisk":69.68052673339844,
              "sysLoadAvg":77.0,
              "heapUsage":6.980811063081137}],
          "violations":[]},
        "WARNING":"This response format is experimental.  It is likely to change in the future."}
      

      Attachments

        1. SOLR-10677-subpath.patch
          5 kB
          Shalin Shekhar Mangar
        2. SOLR-10677.patch
          6 kB
          Shalin Shekhar Mangar
        3. SOLR-10677.patch
          8 kB
          Shalin Shekhar Mangar
        4. SOLR-10677.patch
          8 kB
          Shalin Shekhar Mangar
        5. SOLR-10677.patch
          21 kB
          Shalin Shekhar Mangar
        6. SOLR-10677.patch
          21 kB
          Shalin Shekhar Mangar

        Activity

          People

            shalin Shalin Shekhar Mangar
            shalin Shalin Shekhar Mangar
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: