【发布时间】:2019-12-07 19:18:54
【问题描述】:
有一个基于微服务的架构,其中每个服务都有不同类型的实体。例如:
服务 1:
{
"entity_type": "SKU",
"sku": "123",
"ext_sku": "201",
"store": "1",
"product": "abc",
"timestamp": 1564484862000
}
服务 2:
{
"entity_type": "PRODUCT",
"product": "abc",
"parent": "xyz",
"description": "curd",
"unit_of_measure": "gm",
"quantity": "200",
"timestamp": 1564484863000
}
服务 3:
{
"entity_type": "PRICE",
"meta": {
"store": "1",
"sku": "123"
},
"price": "200",
"currency": "INR",
"timestamp": 1564484962000
}
服务 4:
{
"entity_type": "INVENTORY",
"meta": {
"store": "1",
"sku": "123"
},
"in_stock": true,
"inventory": 10,
"timestamp": 1564484864000
}
我想编写一个由 elasticsearch 支持的 Audit Service,它将摄取所有这些实体,并将基于 entity_type、store、@987654327 进行索引@, timestamp.
弹性搜索在这里会是一个不错的选择吗?另外,索引将如何工作?因此,例如,如果我搜索store=1,它应该将所有具有store 的不同实体返回为1。其次,我能否获取 2 timestamps 之间的所有实体?
ES 和 Kibana(可视化)在这里会是不错的选择吗?
【问题讨论】:
标签: elasticsearch indexing kibana auditing audit-logging