数据接入服务 DIS-Agent如何配置监听多目录或文件?

时间:2024-10-25 16:22:47

Agent如何配置监听多目录或文件?

DIS Agent支持配置监听多个目录或文件,例如想收集"/home/folder1/file1""/home/folder2/file2"这两个文件的日志,可以通过配置多个DISStream来实现:

---
region: REGION
ak: YOUR_AK
sk: YOUR_SK
projectId: YOUR_PROJECTID
endpoint: ENDPOINT
flows:
  - DISStream: YOUR_STREAM
    filePattern: /home/folder1/file1
    initialPosition: START_OF_FILE
    maxBufferAgeMillis: 5000

  - DISStream: YOUR_STREAM
    filePattern: /home/folder2/file2
    initialPosition: START_OF_FILE
    maxBufferAgeMillis: 5000
support.huaweicloud.com/dis_faq/dis_faq_0014.html