【原创】大叔经验分享(45)kibana添加index pattern卡住 返回403 Forbidden


 

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"
        }
    }
}'

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM