我们有一个由 3 个主节点(每个 4 核、16 GB RAM)、3 个热节点(每个 8 核、32 GB RAM、300 GB SSD)和 3 个热节点(每个 8 核、32GB RAM、1.5TB HDD)组成的集群。 。
我们按照 的命名约定为一年中的每个月都有一个索引voucher_YYYY_MMM(eg voucher_2021_JAN)。所有这些索引都有一个voucher充当读取别名的别名,我们的搜索查询针对该读取别名。
我们的索引在热节点上驻留 32 天,在此期间它将接收 99% 的写入。我们估计该索引中的数据约为 4.8 亿个文档,它有 1 个副本和 16 个分片(我们采用了 16 个分片,因为最终我们的数据会增长,现在我们正在考虑缩小到 8 个分片,每个分片有 30 GB数据,根据我们的映射,200 万个文档占用 1GB 空间)。
32天后索引将转移到温节点,目前,我们的热索引中有4.5亿个文档,温索引中有18亿个文档。文档总数达 22.5 亿篇。
我们的文档包含客户 ID 和我们正在应用过滤器的一些字段,它们全部映射为关键字类型,我们用于custom routing on customer id提高搜索速度。
我们典型的查询看起来像
GET voucher/_search?routing=1000636779&search_type=query_then_fetch
{
"from": 0,
"size": 20,
"query": {
"constant_score": {
"filter": {
"bool": {
"filter": [
{
"term": …Run Code Online (Sandbox Code Playgroud) performance query-optimization database-performance elasticsearch elastic-stack
当使用ELK时,Elasticsearch如何索引和存储事件(Elastichsearch,Logstash,Kibana)
Elasticsearch如何在ELK中工作
我正在尝试使用curl命令创建可视化。我正在使用elasticsearch 6.2.3。我可以在elasticsearch 5.6.8中创建相同的对象。我正在使用此命令
curl -XPUT http://localhost:9200/.kibana/visualization/vis1 -H 'Content-Type: application/json' -d @vis1.json
它显示此错误:
{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Rejecting mapping update to [.kibana] as the final mapping would have more than 1 type: [visualization, doc]"}],"type":"illegal_argument_exception","reason":"Rejecting mapping update to [.kibana] as the final mapping would have more than 1 type: [visualization, doc]"},"status":400}Run Code Online (Sandbox Code Playgroud)
vis1.json的内容:
{
"title": "vis1",
"visState": "{\"title\":\"vis1\",\"type\":\"table\",\"params\":{\"perPage\":10,\"showMeticsAtAllLevels\":false,\"showPartialRows\":false,\"showTotal\":false,\"sort\":{\"columnIndex\":null,\"direction\":null},\"totalFunc\":\"sum\"},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"enabled\":true,\"type\":\"date_histogram\",\"schema\":\"split\",\"params\":{\"field\":\"UsageEndDate\",\"interval\":\"M\",\"customInterval\":\"2h\",\"min_doc_count\":1,\"extended_bounds\":{},\"row\":false}},{\"id\":\"3\",\"enabled\":true,\"type\":\"terms\",\"schema\":\"bucket\",\"params\":{\"field\":\"ProductName.keyword\",\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\"}}]}",
"uiStateJSON": "{\"vis\":{\"params\":{\"sort\":{\"columnIndex\":null,\"direction\":null}}}}",
"description": "",
"version": 1,
"kibanaSavedObjectMeta": {
"searchSourceJSON": "{\"index\":\"4eb9f840-3969-11e8-ae19-552e148747c3\",\"filter\":[],\"query\":{\"language\":\"lucene\",\"query\":\"\"}}"
}
}Run Code Online (Sandbox Code Playgroud)
在elasticearch 5.6.8中工作正常,但在6.2.3中则不能。
提前致谢。
我正在试用 Elastic APM。我已经成功创建了一个有数据流入的服务。我想看看我是否可以拥有多个服务。不知何故,我遇到了问题,所以我想删除一些服务。但是,我找不到删除服务的方法。
问题:如何删除 APM 中的服务?
与 APM 相关的索引:
{
"_index": "apm-7.3.2-metric-000001",
"_type": "_doc",
"_id": "XgEhYm0BiAdOXLlDGc-r",
"_version": 1,
"_score": null,
"_source": {
"jvm": {
"memory": {
"non_heap": {
"committed": 87449600,
"max": -1,
"used": 66599704
},
"heap": {
"committed": 232783872,
"max": 2025848832,
"used": 170023936
}
},
"thread": {
"count": 63
},
"gc": {
"alloc": 632406344
}
},
"observer": {
"hostname": "localhost.localdomain",
"id": "d1aec10a-cc4e-44f4-9aed-acf57d107ab7",
"ephemeral_id": "ae48b040-f9f6-4144-a600-d402defaa44a",
"type": "apm-server",
"version": "7.3.2",
"version_major": 7
},
"agent": {
"name": "java",
"ephemeral_id": "66d5c439-271c-483d-a426-d0e569bede4a",
"version": "1.9.0" …Run Code Online (Sandbox Code Playgroud) 我有一个来自logstash的jdbc配置文件
statement => "SELECT * from TEST where id > :sql_last_value"
Run Code Online (Sandbox Code Playgroud)
其中包括上述查询。
假设我有 2 个或更多conf 文件,如何区分我的 sql_last_value ?
我可以给一个别名来区分它们吗?如何?
我正在使用 this_repo开始使用 Docker 运行 ELK。
我的问题是关于 docker-compose 文件中的 logstash 图像:
当我在本地运行时,我有 3 个文件
#general settings
logstash.yml
#pipeline setting
pipeline.yml
#a pipe line configuration
myconf.conf1
Run Code Online (Sandbox Code Playgroud)
当我想使用多管道时,我使用 pipeline.yml 文件来控制我正在运行的所有不同管道
# Example of my pipeline.yml
- pipeline.id: my-first-pipeline
path.config: "/etc/logstash/my-first-pipeline.config"
pipeline.workers: 2
- pipeline.id: super-swell-pipeline
path.config: "/etc/logstash/super-swell-pipeline.config"
queue.type: persisted
Run Code Online (Sandbox Code Playgroud)
在我用作指南的回购中,我只能找到 logstash.yml,我不明白如何添加管道。唯一运行的管道是默认的“main”,默认情况下只运行 logstash.conf 我尝试了不同的配置,所有字段
如何将 pipeline.yml 添加到 docker?或者使用这个 docker-compose 文件运行多管道的最佳实践是什么?
感谢任何帮助
docker-compose/logstash 形成 repo:
logstash:
build:
context: logstash/
args:
ELK_VERSION: $ELK_VERSION
volumes:
- type: bind
source: ./logstash/config/logstash.yml
target: /usr/share/logstash/config/logstash.yml
read_only: true
- type: …Run Code Online (Sandbox Code Playgroud)