我让 Logstash 从日志文件中读取数据status.log
并将输出发送到 Elasticsearch 实例。
我想清理 Elasticsearch 中的数据,因为我正在执行curl -XDELETE 'http://localhost:9200/index_name/_all'
. 如果我通过 head 插件检查,数据就消失了。
如果这还不够,我还将使用echo "" > status.log
.
当我再次执行应用程序时,旧数据重新出现在 Elasticsearch 中,但更新后的@timestamp
. 数据不再出现在status.log
. 新数据已正确插入 Elasticsearch。
如何摆脱旧数据?它仍然存储在 Elasticsearch 中还是 Logstash 有某种缓存?