下面我具体描述一下我遇到的问题。

在kibana上面创建索引点击创建时,一直显示下面的页面

就看到不停的在那转,始终创建不成功。

查看后台日志,看到状态码为403,报了如下的错误

由于我用的是es6版本,所以怀疑是.kibana没有写入权限

我尝试修改index.blocks.write

执行:

PUT .kibana/_settings
{
"index.blocks.write": true
}
发现报了错:

然后我开放了kibana关于elasticsearch的索引权限

执行成功:

然后,再次尝试修改index.blocks.write

执行:

PUT .kibana/_settings
{
"index.blocks.write": true
}
执行成功:

但最后发现还是这样

着实搞得我头大,最后终于在官网上找到了解决方法,具体参照下面这篇文章

https://www.elastic.co/guide/en/kibana/6.0/migrating-6.0-index.html

一共分为四步:

第一步:设置.kibana的index.blocks.write属性为true

PUT .kibana/_settings
{
"index.blocks.write": true
}
执行失败可参照上面的解决方案

第二步:创建创建 .kibana-6 索引

PUT .kibana-6
{
"settings" : {
"number_of_shards" : 1,
"index.mapper.dynamic": false
},
"mappings" : {
"doc": {
"properties": {
"type": {
"type": "keyword"
},
"updated_at": {
"type": "date"
},
"config": {
"properties": {
"buildNum": {
"type": "keyword"
}
}
},
"index-pattern": {
"properties": {
"fieldFormatMap": {
"type": "text"
},
"fields": {
"type": "text"
},
"intervalName": {
"type": "keyword"
},
"notExpandable": {
"type": "boolean"
},
"sourceFilters": {
"type": "text"
},
"timeFieldName": {
"type": "keyword"
},
"title": {
"type": "text"
}
}
},
"visualization": {
"properties": {
"description": {
"type": "text"
},
"kibanaSavedObjectMeta": {
"properties": {
"searchSourceJSON": {
"type": "text"
}
}
},
"savedSearchId": {
"type": "keyword"
},
"title": {
"type": "text"
},
"uiStateJSON": {
"type": "text"
},
"version": {
"type": "integer"
},
"visState": {
"type": "text"
}
}
},
"search": {
"properties": {
"columns": {
"type": "keyword"
},
"description": {
"type": "text"
},
"hits": {
"type": "integer"
},
"kibanaSavedObjectMeta": {
"properties": {
"searchSourceJSON": {
"type": "text"
}
}
},
"sort": {
"type": "keyword"
},
"title": {
"type": "text"
},
"version": {
"type": "integer"
}
}
},
"dashboard": {
"properties": {
"description": {
"type": "text"
},
"hits": {
"type": "integer"
},
"kibanaSavedObjectMeta": {
"properties": {
"searchSourceJSON": {
"type": "text"
}
}
},
"optionsJSON": {
"type": "text"
},
"panelsJSON": {
"type": "text"
},
"refreshInterval": {
"properties": {
"display": {
"type": "keyword"
},
"pause": {
"type": "boolean"
},
"section": {
"type": "integer"
},
"value": {
"type": "integer"
}
}
},
"timeFrom": {
"type": "keyword"
},
"timeRestore": {
"type": "boolean"
},
"timeTo": {
"type": "keyword"
},
"title": {
"type": "text"
},
"uiStateJSON": {
"type": "text"
},
"version": {
"type": "integer"
}
}
},
"url": {
"properties": {
"accessCount": {
"type": "long"
},
"accessDate": {
"type": "date"
},
"createDate": {
"type": "date"
},
"url": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 2048
}
}
}
}
},
"server": {
"properties": {
"uuid": {
"type": "keyword"
}
}
},
"timelion-sheet": {
"properties": {
"description": {
"type": "text"
},
"hits": {
"type": "integer"
},
"kibanaSavedObjectMeta": {
"properties": {
"searchSourceJSON": {
"type": "text"
}
}
},
"timelion_chart_height": {
"type": "integer"
},
"timelion_columns": {
"type": "integer"
},
"timelion_interval": {
"type": "keyword"
},
"timelion_other_interval": {
"type": "keyword"
},
"timelion_rows": {
"type": "integer"
},
"timelion_sheet": {
"type": "text"
},
"title": {
"type": "text"
},
"version": {
"type": "integer"
}
}
},
"graph-workspace": {
"properties": {
"description": {
"type": "text"
},
"kibanaSavedObjectMeta": {
"properties": {
"searchSourceJSON": {
"type": "text"
}
}
},
"numLinks": {
"type": "integer"
},
"numVertices": {
"type": "integer"
},
"title": {
"type": "text"
},
"version": {
"type": "integer"
},
"wsState": {
"type": "text"
}
}
}
}
}
}
}
第三步:Reindex .kibana into .kibana-6

POST _reindex
{
"source": {
"index": ".kibana"
},
"dest": {
"index": ".kibana-6"
},
"script": {
"inline": "ctx._source = [ ctx._type : ctx._source ]; ctx._source.type = ctx._type; ctx._id = ctx._type + \":\" + ctx._id; ctx._type = \"doc\"; ",
"lang": "painless"
}
}
第四步:Alias .kibana-6 to .kibana and remove legacy .kibana index:

POST /_aliases
{
"actions" : [
{ "add": { "index": ".kibana-6", "alias": ".kibana" } },
{ "remove_index": { "index": ".kibana" } }
]
}
最后问题解决,可以重新创建索引模式!!!

但是发现一个问题,就是这样做,会丢失以前创建的所有模式。

解决思路

第一步:

定位磁盘空间是否够用,当磁盘空间不足时,.kibana是没有权限写入的,这个时候根据自身情况处理看如何减少磁盘使用量。

第二步:

在kibana界面的devtools中输入:GET .kibana/_settings并执行。

重点关注一个指标:read_only_allow_delete是不是为true,

  1. my kibana setting output:
  2. {
  3. ".kibana": {
  4. "settings": {
  5. "index": {
  6. "number_of_shards": "1",
  7. "blocks": {
  8. "read_only_allow_delete": "true"
  9. },
  10. "provided_name": ".kibana",
  11. "creation_date": "1511984561925",
  12. "number_of_replicas": "1",
  13. "uuid": "95cOtsa8S6y83KP_3MZ6IQ",
  14. "version": {
  15. "created": "6000099"
  16. }
  17. }
  18. }
  19. }
  20. }

如果为true,在终端执行如下命令,将read_only_allow_delete的值重置,

  1. curl -XPUT -H "Content-Type: application/json" http://localhost:9200/_all/_settings -d '{"index.blocks.read_only_allow_delete": null}'

返回值:

  1. {"acknowledged":true}

证明执行成功。

正确的配置如下:

 

kibana 创建index pattern 索引模式时过慢导致无法创建成功 以及解决方案的更多相关文章

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

    kibana添加index pattern卡住,通过浏览器查看请求返回状态为403 Forbidden,返回消息为: {"message":"blocked by: [F ...

  2. 高性能mysql:创建高性能的索引

    本文系阅读<高性能MySQL>,Baron Schwartz等著一书中第五章 创建高性能的索引的笔记,索引是存储引擎用于快速找到记录的一种数据结构. 索引对于良好的性能非常关键,尤其是当表 ...

  3. Spark2.2+ES6.4.2(三十二):ES API之index的create/update/delete/open/close(创建index时设置setting,并创建index后根据avro模板动态设置index的mapping)

    要想通过ES API对es的操作,必须获取到TransportClient对象,让后根据TransportClient获取到IndicesAdminClient对象后,方可以根据IndicesAdmi ...

  4. SAS创建和使用索引(SAS INDEX)

    一.概述 在合并数据集的时候,可以使用DATA步,但使用DATA 步时需要对KEY VALUE 排序,且KEY VALUE 的名字也必须一致:也可以用PROC SQL ,不需要进行上述排序.重命名的步 ...

  5. mysql笔记02 创建高性能的索引

    创建高性能的索引 1. 索引(在MySQL中也叫做"键(key)")是存储引擎用于快速找到记录的一种数据结构. 2. 索引可以包含一个或多个列的值.如果索引包含多个列,那么列的顺序 ...

  6. Thinking In Design Pattern——MVP模式演绎

    原文<Thinking In Design Pattern——MVP模式演绎>不知为何丢失了,故重新整理了一遍. 目录 What Is MVP Domain Model StubRepos ...

  7. Event Sourcing Pattern 事件源模式

    Use an append-only store to record the full series of events that describe actions taken on data in ...

  8. 高性能MySQL笔记 第5章 创建高性能的索引

    索引(index),在MySQL中也被叫做键(key),是存储引擎用于快速找到记录的一种数据结构.索引优化是对查询性能优化最有效的手段.   5.1 索引基础   索引的类型   索引是在存储引擎层而 ...

  9. 基础:从概念理解Lucene的Index(索引)文档模型

    转:http://blog.csdn.net/duck_genuine/article/details/6053430   目录(?)[+]   Lucene主要有两种文档模型:Document和Fi ...

随机推荐

  1. 2019年一次java知识点总结

    java基础 数据类型 集合与数据结构 关键字(static,rty ...) IO和网络 多线程(并发与锁,死锁) 异常 简单算法,复杂度 JVM 类加载 java内存模型 对象监听器字节码 垃圾回 ...

  2. JavaScript 当月第一天和最后一天

    1. 概述 1.1 说明 在项目过程中,有时候需要默认展示一个月的查询条件,即当月的第一天和最后一天. 2. 代码 2.1 代码示例 直接调用getFirstAndLastDay()即可得到当月的第一 ...

  3. C# EntityFramework Code First 迁移 降级 回退到空数据库

    C# EntityFramework  Code First 迁移 降级 回退到空数据库 1.包管理器控制台-迁移 在包管理器控制台中运行 Enable-Migrations Add-Migratio ...

  4. source ~/.bash_profile 只生效一次 解决方案

    在~/.zshrc文件最后,增加一行: source ~/.bash_profile

  5. datatable 给某一列添加title属性

    简单描述:采用datatable拼接的表格,没有title属性,嗯就是这个情况,直接上代码 代码: //js代码$("#toAdd").click("click" ...

  6. 【算法】Normalization

    Normalization(归一化) 写这一篇的原因是以前只知道一个Batch Normalization,自以为懂了.结果最近看文章,又发现一个Layer Normalization,一下就懵逼了. ...

  7. 使用requests+pyquery爬取dd373地下城跨五最新商品信息

    废话不多说直接上代码: 可以使用openpyel库对爬取的信息写入Execl表格中代码我就不上传了 import requests from urllib.parse import urlencode ...

  8. 基于Vue2.x的小米商城移动端项目

    初学vue已经有一段时间,为了检验自己的学习成果,决定做一个项目作为一个阶段性总结,项目花了差不多半个月时间,目前实现了7个页面,商城的主要功能基本实现,代码已经放到github上面. 这个项目把大部 ...

  9. NLP自然语言处理原理及名词介绍

    1. 自然语言概念 自然语言,即我们人类日常所使用的语言,是人类交际的重要方式,也是人类区别其他动物的本质特征. 但是我们只能通过自然语言与人交流,无法与计算机进行交流. 2. 自然语言处理 自然语言 ...

  10. C++ STL容器总结

    1.    STL 容器 1.    按种类划分 顺序容器( sequence containers):是一种各元素之间有顺序关系的线性表,是一种线性结构的可序群集.顺序性容器中的每个元素均有固定的位 ...