Node Stats API in 7.15 broken?

Hello!

In #75433 you added a shard count structure to the Node Stats API. That results in a new JSON key named shards. However, if you run the Node Stats API with level=shards, you already have a JSON key named shards.

$ curl -H 'Content-Type: application/json' -XGET 'http://localhost:9200/_nodes/stats?level=shards&human=true&pretty=true'

yields

...
      "indices" : {
        "docs" : {
          "count" : 48,
          "deleted" : 0
        },
        "shards" : {                    // <--
          "total_count" : 2
        },
...
        "shards" : {                   // <--
          ".tasks" : [
            {
              "0" : {
                "routing" : {
                  "state" : "STARTED",
                  "primary" : true,
                  "node" : "f8Z10TwPSKqTNsnnJiFRtg",
                  "relocating_node" : null
                },
                "docs" : {
                  "count" : 5,
                  "deleted" : 0
                },
          "memory_size_in_bytes" : 0,
          "evictions" : 0
        },
...

Best,
Oliver

Seems like a bug, would you report it on Github rather than here?

1 Like

Sure. Will do.

2 Likes

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.