【发布时间】:2020-01-28 08:04:23
【问题描述】:
我已经设置了 2 个相同的 ELK 服务器来在我的测试环境中同步 MariaDB(从转储 sql 恢复,因此它是非活动表,没有活动插入活动)表。
这个 MariaDB 表由 15,359,086 行组成。
但是,当使用 Logstash 将数据同步到 Elasticsearch 时,我注意到计数不匹配。
从第一个 ELK 服务器,我使用 count API 获得了这个数量
{
"count": 15936359,
"_shards": {
"total": 1,
"successful": 1,
"skipped": 0,
"failed": 0
}
}
以及来自第二个 ELK 服务器
{
"count": 14934148,
"_shards": {
"total": 1,
"successful": 1,
"skipped": 0,
"failed": 0
}
}
同步时出现这种差异的原因是什么?没有一个 ELK 从源返回正确的值,即使设置相同,两个堆栈也会给出不同的计数
我正在使用 Postman 的这个计数 API
GET http://localhost:9200/index/_count
{
"query" : {
"term" : { "type" : "column in DB" }
}
}
【问题讨论】:
-
能否请您添加您执行的计数 API 调用?
-
使用 count API 更新问题
标签: mysql elasticsearch mariadb logstash elastic-stack