pra*_* kp 1 fluent elasticsearch fluentd td-agent
我需要将日志存储到 Es 索引,当我使用 logstash 日期被附加到索引名称为 logstash.2018-08-06 时,但是当我尝试在流动的 conf 中提供自定义名称时,它没有被添加
</store>
<store>
@type elasticsearch
host X.X.X.X
port 9200
logstash_format false
index_name updatetest.%Y%m%d --> In index name its not replacing with date
</store>
Run Code Online (Sandbox Code Playgroud)
这是索引名称,由上面的 conf updatetest.%Y%m%d 创建 --> 它应该像 updatetest.20180806
提前感谢您的帮助
小智 5
如果您不想使用 logstash 格式,这也适用:
<store>
@type elasticsearch
host x.x.x.x
index_name test.%Y%m
<buffer tag, time>
timekey 1h
</buffer>
flush_interval 5s
</store>
Run Code Online (Sandbox Code Playgroud)
现在 %Y 和 %m 被替换了。定义缓冲区使日期时间格式代码可用。
| 归档时间: |
|
| 查看次数: |
1535 次 |
| 最近记录: |