删除connection_record任务

This commit is contained in:
houjinchuan
2022-08-01 11:17:56 +08:00
parent 24df5b9580
commit 51697876ad
3 changed files with 0 additions and 80 deletions

View File

@@ -1,51 +0,0 @@
#!/bin/sh
#gohangout启动文件
#配置文件名称,注意配置文件需要放在$BASE_DIR/conf文件夹下
YML_NAME=k2ck_connection_record_log_tsgv3
#gohangout的二进制启动文件路径
BASE_DIR=$(cd $(dirname $0); cd ../../; pwd)
#日志级别,1,5,10,数字越大日志越详细
LOG_LV=5
#线程总数,即开启worker数量,每个线程拥有自己的filter, output,占用多份内存,默认1个线程
THREAD_SUM=3
#进程总数
PROCESS_SUM=$1
if [ ! -d "$BASE_DIR/logs" ]; then
mkdir -p $BASE_DIR/logs
fi
echo "###########################$(date +%Y%m%d%H%M%S)###########################" >> $BASE_DIR/bin/start_log/${YML_NAME}_restart.log
id=0
logid=0
while true ; do
NUM=`ps -ef | grep -w ${YML_NAME}.yml | grep -v grep |wc -l`
pids=$(ps -ef | grep -w ${YML_NAME}.yml | grep -v grep | awk '{print $2}')
time_stamp=$(date +%Y%m%d%H%M%S)
if [ "${NUM}" -lt ${PROCESS_SUM} ];then
$BASE_DIR/bin/gohangout --config $BASE_DIR/conf/${YML_NAME}.yml --logtostderr --v ${LOG_LV} --worker ${THREAD_SUM} >> $BASE_DIR/logs/${YML_NAME}.log 2>&1 &
echo "${time_stamp} ---> the ${YML_NAME}APP restart ---> $id" >> $BASE_DIR/bin/start_log/${YML_NAME}_restart.log
((logid++))
((id++))
if [ ${logid} -gt ${PROCESS_SUM} ];then
logid=0
pids=$(ps -ef | grep -w ${YML_NAME}.yml | grep -v grep | awk '{print $2}')
for pid in $pids
do
kill -9 $pid
done
echo "kafka or clickhouse is error,reset gohangout,sleep 30s... ..." >> $BASE_DIR/bin/start_log/${YML_NAME}_restart.log
sleep 30
fi
#大于设置进程数,杀掉所有进程,重启
elif [ "${NUM}" -gt ${PROCESS_SUM} ];then
for pid in $pids
do
kill -9 $pid
done
id=0
fi
sleep 1
done

View File

@@ -1,28 +0,0 @@
inputs:
- Kafka:
topic:
CONNECTION-RECORD-COMPLETED-LOG: 1
#assign:
# weblog: [0,9]
codec: json
consumer_settings:
bootstrap.servers: "192.168.44.55:9092"
group.id: connection_record_completed_tsgv3
max.partition.fetch.bytes: '10485760'
auto.commit.interval.ms: '5000'
# from.beginning: 'true'
# sasl.mechanism: PLAIN
# sasl.user: admin
# sasl.password: admin-secret
outputs:
- Clickhouse:
table: 'tsg_galaxy_v3.connection_record_log_local'
username: 'default'
password: 'ceiec2019'
hosts:
- 'tcp://192.168.44.55:9001'
bulk_actions: 100000
flush_interval: 30
concurrent: 2
conn_max_life_time: 60

View File

@@ -2,7 +2,6 @@
STARTDIR=$(cd $(dirname $0); pwd)
nohup $STARTDIR/bin/ghoStart/start_gohangout_k2ck_connection_record_log_tsgv3.sh $1 > /dev/null 2>&1 &
nohup $STARTDIR/bin/ghoStart/start_gohangout_k2ck_cn_record.sh $1 > /dev/null 2>&1 &
nohup $STARTDIR/bin/ghoStart/start_gohangout_k2ck_metric_ip_cn.sh $1 > /dev/null 2>&1 &
nohup $STARTDIR/bin/ghoStart/start_gohangout_k2ck_metric_region_cn.sh $1 > /dev/null 2>&1 &