Updated at: 2022-12-09 03:49:50
You can monitor the changes of the same type of log files in one or more folders through a script, to automatically generate Rsyslog configuration file script for Rsyslog streaming upload. The specific steps are as follows: 
1. Find the directory of the script: cd /anyrobot-installer/anyrobot/tools/rsyslog_upload_directory
2. Create Rsyslog monitoring task, with reference command as follows:

3. View Rsyslog monitoring task as follows:

4. Delete Rsyslog monitoring task, as follows: 

1. Two Rsyslog streaming upload scripts must be in the same path;
2. After the monitoring task is successfully created, it will take 1 minute to generate the configuration file by default. After the configuration file is generated, it means that the data has been uploaded (view path: /etc/rsyslog.d/ );

3. It does not support monitoring log files with spaces in the file name;
4. After the configuration file is generated, check whether the log has been uploaded successfully by the following methods: 
• Method 1: You can create a log group based on information such as the log source or port number, switch to the log group on the Search, and view the uploaded log;
• Method 2: Without creating a log group, you can directly filter and search by port and other information on the Search.