下面的yaml用于从fluen-bit推送数据。在logstash日志中,数据即将到来,但logstash没有填充索引。 Fluentbit 使用 VAC 在 tanzu 集群中配置。
[INPUT]
Name tail
Path /data/logs/RestApiInfoLog*.json
Tag test-mgmt
Refresh_Interval 5
DB /data/fluent-bit/test-mgmt-taildb
read_from_head true
Multiline On
Mem_Buf_Limit 1048MB
Buffer_Max_Size 500MB
Buffer_Chunk_Size 400k
Parser_Firstline singleline
multiline.parser multiline-regex
[OUTPUT]
Name tcp
Match test-mgmt
Host xx.xx.xx.xx
Port 5052
在logstashconf文件中。
input {
tcp {
port => 5052
codec => json_lines
}
}
output{
if [tags] =~ "test-mgmt" {
elasticsearch {
hosts => ["https://127.0.0.1:9200"]
index => "test-mgmt-%{+YYYY.MM.dd}"
ssl_certificate_verification => false
user => "xxxxx"
password => "xxxxxx"
}
}
有人可以强调下面的问题,为什么索引没有填充数据。
尝试在 Fluent-bit 输出配置中定义以下方式,
[OUTPUT]
Name tcp
Index test-mgmt-%Y-%m-%d
Type _doc
Trace_Output On
Trace_Error On
Match test-mgmt