Commit 869511e9 authored by kalvin's avatar kalvin

3B集群 增加 filebeat

parent da19c8e9
......@@ -42,6 +42,18 @@ if [[ $CLUSTER == "3B" ]]; then
sleep 1
done
PULL_TAR=http://192.168.3.60/QA/qg-docker-entrypoints/raw/master/other/filebeat/filebeat.tgz
TAR_PACKAGE=filebeat.tgz
LOGS_PATH="\/home\/quant_group\/logs\/*.log"
HOST_NAME=`cat /home/quant_group/build_info | grep 'SYSTEM_NAME' | awk -F: '{print $2}'`
HOME_PATH="/home/quant_group"
cd ${HOME_PATH} && curl -O ${PULL_TAR} && tar zxf ${TAR_PACKAGE} -C ${HOME_PATH}
eval "sed -i 's/logs_path/${LOGS_PATH}/' ${HOME_PATH}/filebeat/filebeat.yml"
eval "sed -i 's/host_name/${HOST_NAME}/g' ${HOME_PATH}/filebeat/filebeat.yml"
chown -R root:root ${HOME_PATH}/filebeat/
cd ${HOME_PATH}/filebeat/ && nohup ./filebeat filebeat.yml &
if [[ $count -eq 60 ]] && [[ $log_exist -eq 0 ]]; then
touch ./logs/error.log
echo "Log is not exist or java server start error." >> ./logs/error.log
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment