Name of the DIS stream to which files whose names match filePattern will be uploaded.
-
filePattern
Name of the files to be uploaded. Currently, files to be uploaded are searched only by file name.
-
initialPosition
Monitoring start position. Values: END_OF_FILE After the DIS Agent starts, it does not upload the files whose names match filePattern. Instead, file uploading starts from the newly added file or file content; START_OF_FILE All the files whose names match filePattern will be uploaded to DIS in ascending order of file modification time.
START_OF_FILE
maxBufferAgeMillis
The maximum number of milliseconds that must elapse before files can be uploaded to the specified DIS stream. l If the buffer is full with files waiting to be uploaded, files will be immediately uploaded to the specified DIS stream. l If the buffer is not full, files will be uploaded to the specified DIS stream after the specified number of milliseconds elapses
5000
Agent configuration Example
---
# cloud region id
region: cn-north-1
# you ak (get from 'My Credential')
ak: YOU_AK
# you sk (get from 'My Credential')
sk: YOU_SK
# you project id (get from 'My Credential')
projectId: YOU_PROJECTID
# the dis endpoint
endpoint: https://dis.cn-north-1.myhuaweicloud.com
# config each flow to monitor file.
flows:
### DIS Stream
- DISStream: YOU_DIS_STREAM_1
## only support specified directory, filename can use * to match some files. eg. * means match all file, test*.log means match test1.log or test-12.log and so on.
filePattern: /tmp/*.log
## from where to start: 'START_OF_FILE' or 'END_OF_FILE'
initialPosition: START_OF_FILE
## upload max interval(ms)
maxBufferAgeMillis: 5000
Starting DIS Agent
Run the following command to start the DIS Agent:
bash bin/start-dis-agent.sh
If information similar to the following appears, the DIS Agent has started successfully.
Success to start Agent [xxxxx].
Stopping DIS Agent
Run the following command to stop the DIS Agent:
bash bin/stop-dis-agent.sh
If information similar to the following appears, the DIS Agent is stopping:
Stopping Agent [xxxxx].....
In the command output, [xxxxx] indicates the process ID.
If information similar to the following appears, the DIS Agent has stopped:
Welcome to DIS Agent
Getting Started
Requirements
To get started using dis agent, you will need those things:
Install DIS Agent
Configuring DIS Agent
END_OF_FILEAfter the DIS Agent starts, it does not upload the files whose names match filePattern. Instead, file uploading starts from the newly added file or file content;START_OF_FILEAll the files whose names match filePattern will be uploaded to DIS in ascending order of file modification time.Agent configuration Example
Starting DIS Agent
Run the following command to start the DIS Agent:
If information similar to the following appears, the DIS Agent has started successfully.
Stopping DIS Agent
Run the following command to stop the DIS Agent:
If information similar to the following appears, the DIS Agent is stopping:
In the command output, [xxxxx] indicates the process ID. If information similar to the following appears, the DIS Agent has stopped: