如何通过 elasticsearch 中的查询找出索引的大小(以字节为单位)?

How can I find out the size of an index in bytes with a query in elasticsearch?

如何通过 kibana 的查询找出索引的字节大小?我尝试了一些查询,但没有 return 结果。

GET /my_index_name/_stats 

 GET /_cat/indices/my-index_name?v=true&s=index

错误:

{
  "error" : {
    "root_cause" : [
      {
        "type" : "security_exception",
        "reason" : "current license is non-compliant for [security]",
        "license.expired.feature" : "security",
        "suppressed" : [
          {
            "type" : "security_exception",
            "reason" : "current license is non-compliant for [security]",
            "license.expired.feature" : "security"
          }
        ]
      }
    ],
    "type" : "security_exception",
    "reason" : "current license is non-compliant for [security]",
    "license.expired.feature" : "security",
    "suppressed" : [
      {
        "type" : "security_exception",
        "reason" : "current license is non-compliant for [security]",
        "license.expired.feature" : "security"
      }
    ]
  },
  "status" : 403
}

我能做些什么来解决这个问题请帮助我!

您需要将以下内容添加到您的 elasticsearch.yml 配置文件并重新启动您的节点。

xpack.security.enabled: false