gpt4 book ai didi

elasticsearch - Filebeat 7.9.3更改索引不起作用,并且始终创建默认的Filebeat-7.9.3-2020.11.04-000001

转载 作者:行者123 更新时间:2023-12-03 01:09:49 26 4
gpt4 key购买 nike

我试过了
https://www.elastic.co/guide/en/beats/filebeat/master//change-index-name.html#change-index-name
https://discuss.elastic.co/t/index-management-change-index-name-in-filebeat/202876
在Windows环境中使用filebeat-7.9.3和kibana-7.9.2。但是在Kibana中它没有创建我在filebeat.yml中提到的索引名

# ============================== Filebeat inputs ===============================

filebeat.inputs:
- type: log
- C:\FREESOFT\myfilebeatlogs\*


# ============================== Filebeat modules ==============================

filebeat.config.modules:
# Glob pattern for configuration loading
path: ${path.config}/modules.d/*.yml

# Set to true to enable config reloading
reload.enabled: false

# ======================= Elasticsearch template setting =======================

setup.template.settings:
index.number_of_shards: 1
#index.codec: best_compression
#_source.enabled: false

# ================================== Outputs ===================================

# Configure what output to use when sending the data collected by the beat.

# ---------------------------- Elasticsearch Output ----------------------------
output.elasticsearch:
# Array of hosts to connect to.
hosts: ["localhost:9200"]
index: "customindexname-%{+yyyy.MM.dd}"
我也尝试过
index: "myindexname-%{+yyyy.MM.dd}"
setup.template.enabled: false
setup.template.name: "myindexname"
setup.template.pattern: "myindexname-*"
请为此提供帮助,我想创建一个自定义索引并从Filebeat插入数据。堆栈中的过去问题并没有解决我的问题。

最佳答案

下面的配置为我工作,并创建我想要的索引名称

filebeat.inputs:
- type: log
paths:
- "/var/log/*.log"
setup.ilm.enabled: false
setup.template.overwrite: true
output.elasticsearch:
hosts: ["<my-es-host>"]
index: "foo-%{+yyyy.MM}"
username: '${ELASTICSEARCH_USERNAME:elastic}'
password: '${ELASTICSEARCH_PASSWORD:elastic}'

setup.template:
name: 'foo'
pattern: 'foo-*'
enabled: false

关于elasticsearch - Filebeat 7.9.3更改索引不起作用,并且始终创建默认的Filebeat-7.9.3-2020.11.04-000001,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64674874/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com