[QUESTION]: iLogtail 如何配置才能采集历史日志? #669
-
iLogtail 默认只采集增量的日志,对于安装 iLogtail 时已经产生很多历史日志的场景,如何配置才能让 iLogtail 采集历史的日志? |
Beta Was this translation helpful? Give feedback.
Answered by
linrunqi08
Feb 18, 2023
Replies: 1 comment 4 replies
-
在/usr/local/ilogtail目录下创建local_event.json文件,文件的配置包含三个字段,config(采集配置的标识,格式为config#${配置文件绝对路径}),dir(要采集历史文件的目录)和name(要采集的历史文件的名字) 可以通过以下步骤检查是否加载该local_event配置。
|
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
messixukejia
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
在/usr/local/ilogtail目录下创建local_event.json文件,文件的配置包含三个字段,config(采集配置的标识,格式为config#${配置文件绝对路径}),dir(要采集历史文件的目录)和name(要采集的历史文件的名字)
样例如下
[
{
"config": "config#/usr/local/ilogtail/./user_yaml_config.d/test_sample.yaml",
"dir": "/data/log",
"name": "*.log"
}
]
可以通过以下步骤检查是否加载该local_event配置。