Reference for log_archive script
This reference explains advanced options of the log_archive.sh script used to create an archive out of aggregated logs.
Script options
-c <component>specify the component name of desired logs.<INSTALL_DIR>/logs/<SERVER_GROUP>/<hostname>/<component>/<date>/filename.log-d <date>specify date of desired logs<INSTALL_DIR>/logs/<SERVER_GROUP>/<hostname>/<component>/<date>/filename.logDefine date for what do you need logs, in the following format YYYY-mm-dd, for example, 2018-10-25.
Regex can be used.
Example: get all logs on October 2018.
$ /opt/workfusion/tools/log_archiver.sh -d 2018-10-*-g <SERVER_GROUP>specify server_role of desired logs<INSTALL_DIR>/logs/<SERVER_GROUP>/<hostname>/<component>/<date>/filename.logAvailable server groups:
dbappocrbivds_mastervds_slaverpa
-h <hostname>specify hostname of desired logs.<INSTALL_DIR>/logs/<SERVER_GROUP>/<hostname>/<component>/<date>/filename.logPlace hostname here if you need to get logs from a concrete host.
Regular expressions can be used.
Example: get logs from multiple servers vds-agent-20.example.com, vds-agent-21.example.com
/opt/workfusion/tools/log_archiver.sh -h vds-agent-2[0-1].example.com