【问题标题】:Where does log stash saves my data?log stash 在哪里保存我的数据?
【发布时间】:2015-01-19 21:03:00
【问题描述】:

我想知道 log-stash 将我的数据保存在哪里,我想删除所有现有数据,因为我在上传时出错了,我试图删除所有索引并清除缓存,但我的数据仍然存在基巴纳。我检查了我的 elasticsearch.yml 文件中的数据位置,并手动删除了所有索引,但我的数据仍在 kibana 上。谁能帮我删除现有数据?

提前致谢。这是我的弹性搜索配置文件:

cluster.name: elastic search
network.host: ****
node.name: "mole"
node.data: true
node.master: true
path.data: /opt/data/elasticsearch/
path.work: /opt/data/elasticsearch/

【问题讨论】:

  • 您需要为 logstash 和 elasticsearch 提供配置文件,以便任何人帮助您。
  • 这是我的弹性搜索配置文件:cluster.name:elastic search network.host:**** node.name:“mole” node.data:true node.master:true path.data :/opt/data/elasticsearch/ path.work:/opt/data/elasticsearch/

标签: logging elasticsearch logstash kibana


【解决方案1】:

删除索引 API 允许删除现有索引。

$ curl -XDELETE 'http://localhost:9200/twitter/'

假设您在 9200 端口运行 elasticsearch。 上面的示例删除了一个名为 twitter 的索引。需要指定索引、别名或通配符表达式。

delete index API 也可以应用于多个索引,或者通过使用

应用于所有索引(小心!)
curl -XDELETE 'http://localhost:9200/_all'

为了禁用允许通过通配符或 _all 删除索引,请将配置中的 action.破坏性_requires_name 设置设置为 true。此设置也可以通过集群更新设置 api 进行更改。

Reference

【讨论】:

  • Vova Lando,您好,感谢您的回复。我已经尝试过同样的事情,但数据仍然存在于我的 kibana 仪表板上,我想清除所有数据,然后我可以运行执行我的脚本来获取新数据。
  • 它对我有用,第二行:"curl -XDELETE 'localhost:9200/_all'" 你确定你在端口 9200 上运行你的弹性搜索吗?检查 /etc/elasticsearch/elasticsearch.yml 中的弹性搜索配置
  • Vova Lando,是的,我很确定 $ curl -XDELETE localhost:9200/antivirus*/ {"acknowledged":true} 但我的数据仍然存在于 kibana 上。
猜你喜欢
  • 1970-01-01
  • 2012-07-07
  • 2010-12-20
  • 1970-01-01
  • 2021-05-04
  • 2019-05-08
  • 2017-09-12
  • 1970-01-01
  • 2014-07-04
相关资源
最近更新 更多