firstNBytesForIdentifier (#52)

* firstNBytesForIdentifier
This commit is contained in:
mmaxiaolei 2022-05-10 17:55:01 +08:00 committed by GitHub
parent 022ac16ee2
commit 41584a010d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -122,6 +122,12 @@ state含义解释
| --------------- | ------------- | ---------- | -------- | ------------------------------------------------------------ |
| inactiveTimeout | time.Duration | 非必填 | 3s | 如果当文件从上一次采集到现在超过inactiveTimeout的话则认为文件进入不活跃状态(即最后一条日志已经写入完成),则可以安全的采集最后一行日志 |
## firstNBytesForIdentifier
| `字段` | `类型` | `是否必填` | `默认值` | `含义` |
| ------------------------ | ------ | ---------- | -------- | ------------------------------------------------------------ |
| firstNBytesForIdentifier | int | 非必填 | 128 | 使用采集目标文件的前n个字符来生成文件唯一code。**如果文件的大小小于n则该文件暂时不会采集**。用途主要是结合文件inode信息用来精确标识一个文件。辅助判断文件是否删除或者是改名 |
## multi
多行采集相关配置