[ 
https://issues.apache.org/jira/browse/SOLR-10677?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Shalin Shekhar Mangar updated SOLR-10677:
-----------------------------------------
    Description: 
Expose a diagnostics API to gives details of how loaded each node is, according 
to the configured cluster policy and preferences. This should probably fold 
into the autoscaling read APIs added in SOLR-10373.

By adding {{diagnostics=true}} as a request parameter for /admin/autoscaling 
(for v1 API) or /cluster/autoscaling (for v2 API), the API returns the list of 
nodes in sorted order according to the cluster preferences configured.

API v1:
{code}
curl 
http://localhost:8983/solr/admin/autoscaling?diagnostics=true&wt=json&indent=on
{code}
or API v2:
{code}
http://localhost:8983/v2/cluster/autoscaling?diagnostics=true&wt=json&indent=on
{code}
{code}
{
  "responseHeader":{
    "status":0,
    "QTime":59},
  "cluster-preferences":[{
      "minimize":"cores",
      "precision":3},
    {
      "maximize":"freedisk",
      "precision":100},
    {
      "minimize":"sysLoadAvg",
      "precision":10}],
  "cluster-policy":[{
      "cores":"<10",
      "node":"#ANY"},
    {
      "replica":"<2",
      "shard":"#EACH",
      "node":"#ANY"},
    {
      "nodeRole":"!overseer",
      "replica":"#ANY"}],
  "diagnostics":{
    "sortedNodes":[{
        "node":"127.0.1.1:7574_solr",
        "cores":12,
        "freedisk":74816704512,
        "sysLoadAvg":72.0},
      {
        "node":"127.0.1.1:8983_solr",
        "cores":12,
        "freedisk":74816704512,
        "sysLoadAvg":72.0}],
    "violations":[{
        "collection":"xyz",
        "shard":"shard1",
        "node":"127.0.1.1:7574_solr",
        "violation":{
          "replica":"10"},
        "clause":{
          "replica":"<2",
          "shard":"#EACH",
          "node":"#ANY",
          "collection":"xyz"}},
      {
        "collection":"xyz",
        "shard":"shard1",
        "node":"127.0.1.1:8983_solr",
        "violation":{
          "replica":"10"},
        "clause":{
          "replica":"<2",
          "shard":"#EACH",
          "node":"#ANY",
          "collection":"xyz"}}]},
  "WARNING":"This response format is experimental.  It is likely to change in 
the future."}
{code}

  was:
Expose a diagnostics API to gives details of how loaded each node is, according 
to the configured cluster policy and preferences. This should probably fold 
into the autoscaling read APIs added in SOLR-10373.

By adding {{diagnostics=true}} as a request parameter for /admin/autoscaling 
(for v1 API) or /cluster/autoscaling (for v2 API), the API returns the list of 
nodes in sorted order according to the cluster preferences configured.

API v1:
{code}
curl 
http://localhost:8983/solr/admin/autoscaling?diagnostics=true&wt=json&indent=on
{code}
or API v2:
{code}
http://localhost:8983/v2/cluster/autoscaling?diagnostics=true&wt=json&indent=on
{code}
{code}
{
  "responseHeader":{
    "status":0,
    "QTime":84},
  "cluster-preferences":[{
      "minimize":"cores",
      "precision":3},
    {
      "maximize":"freedisk",
      "precision":100},
    {
      "minimize":"cpu",
      "precision":10}],
  "diagnostics":[{
      "127.0.1.1:7574_solr":{
        "replicas":{"gettingstarted":{
            "shard2":[{
                "core_node4":{}}],
            "shard1":[{
                "core_node3":{}}]}},
        "cores":2,
        "freedisk":75120390144,
        "cpu":null}},
    {
      "127.0.1.1:8983_solr":{
        "replicas":{"gettingstarted":{
            "shard2":[{
                "core_node2":{}}],
            "shard1":[{
                "core_node1":{}}]}},
        "cores":2,
        "freedisk":75120390144,
        "cpu":null}}],
  "WARNING":"This response format is experimental.  It is likely to change in 
the future."}
{code}


> Expose a diagnostics API to gives details of how loaded each node is, 
> according to the policies
> -----------------------------------------------------------------------------------------------
>
>                 Key: SOLR-10677
>                 URL: https://issues.apache.org/jira/browse/SOLR-10677
>             Project: Solr
>          Issue Type: Sub-task
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: SolrCloud
>            Reporter: Shalin Shekhar Mangar
>            Assignee: Shalin Shekhar Mangar
>              Labels: autoscaling
>             Fix For: master (7.0)
>
>         Attachments: SOLR-10677.patch, SOLR-10677.patch, SOLR-10677.patch
>
>
> Expose a diagnostics API to gives details of how loaded each node is, 
> according to the configured cluster policy and preferences. This should 
> probably fold into the autoscaling read APIs added in SOLR-10373.
> By adding {{diagnostics=true}} as a request parameter for /admin/autoscaling 
> (for v1 API) or /cluster/autoscaling (for v2 API), the API returns the list 
> of nodes in sorted order according to the cluster preferences configured.
> API v1:
> {code}
> curl 
> http://localhost:8983/solr/admin/autoscaling?diagnostics=true&wt=json&indent=on
> {code}
> or API v2:
> {code}
> http://localhost:8983/v2/cluster/autoscaling?diagnostics=true&wt=json&indent=on
> {code}
> {code}
> {
>   "responseHeader":{
>     "status":0,
>     "QTime":59},
>   "cluster-preferences":[{
>       "minimize":"cores",
>       "precision":3},
>     {
>       "maximize":"freedisk",
>       "precision":100},
>     {
>       "minimize":"sysLoadAvg",
>       "precision":10}],
>   "cluster-policy":[{
>       "cores":"<10",
>       "node":"#ANY"},
>     {
>       "replica":"<2",
>       "shard":"#EACH",
>       "node":"#ANY"},
>     {
>       "nodeRole":"!overseer",
>       "replica":"#ANY"}],
>   "diagnostics":{
>     "sortedNodes":[{
>         "node":"127.0.1.1:7574_solr",
>         "cores":12,
>         "freedisk":74816704512,
>         "sysLoadAvg":72.0},
>       {
>         "node":"127.0.1.1:8983_solr",
>         "cores":12,
>         "freedisk":74816704512,
>         "sysLoadAvg":72.0}],
>     "violations":[{
>         "collection":"xyz",
>         "shard":"shard1",
>         "node":"127.0.1.1:7574_solr",
>         "violation":{
>           "replica":"10"},
>         "clause":{
>           "replica":"<2",
>           "shard":"#EACH",
>           "node":"#ANY",
>           "collection":"xyz"}},
>       {
>         "collection":"xyz",
>         "shard":"shard1",
>         "node":"127.0.1.1:8983_solr",
>         "violation":{
>           "replica":"10"},
>         "clause":{
>           "replica":"<2",
>           "shard":"#EACH",
>           "node":"#ANY",
>           "collection":"xyz"}}]},
>   "WARNING":"This response format is experimental.  It is likely to change in 
> the future."}
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to