添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

kibana添加index pattern卡住,通过浏览器查看请求返回状态为403 Forbidden,返回消息为:

{"message":"blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];: [cluster_block_exception] blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];","statusCode":403,"error":"Forbidden"}

通过curl模拟请求响应如下:

# curl -XPOST -H 'Content-Type: application/json' -H 'kbn-version: 6.6.0' http://kibana_server:5600/api/saved_objects/index-pattern -d '{"attributes": {"title": "index-prefix-*", "timeFieldName": "@timestamp"}}'
{"message":"blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];: [cluster_block_exception] blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];","statusCode":403,"error":"Forbidden"}

解决方法:设置es索引参数

# curl -XPUT -H 'Content-Type: application/json' http://es_server:9200/_settings -d '
    "index": {
        "blocks": {
            "read_only_allow_delete": "false"
# curl -XPUT -H 'Content-Type: application/json' http://es_server:9200/$index_name/_settings -d '
    "index": {
        "blocks": {
            "read_only_allow_delete": "false"
---------------------------------------------------------------- 结束啦,我是大魔王先生的分割线 :) ----------------------------------------------------------------
  • 由于大魔王先生能力有限,文中可能存在错误,欢迎指正、补充!
  • 感谢您的阅读,如果文章对您有用,那么请为大魔王先生轻轻点个赞,ありがとう
  •