更新hosutil

This commit is contained in:
houjinchuan
2024-07-22 18:15:37 +08:00
parent ba2eb4879d
commit 1f851483eb
3 changed files with 36 additions and 9 deletions

View File

@@ -0,0 +1,22 @@
qgw.serverAddr=http://192.168.44.67:9999
hos.serverAddr=http://192.168.44.67:9098
hos.token=c21f969b5f03d33d43e04f8f136e7682
kafka.server=192.168.44.11:9092
#延迟时间,校验多少秒之前的文件,单位秒
hos.timeDelay=180
kafka.traffic.topic=TRAFFIC-FILE-STREAM-RECORD
kafka.troubleshooting.topic=TROUBLESHOOTING-FILE-STREAM-RECORD
file.chunk.combiner.window.time=11000
traffic.file.count=0
threads=1
maxThreads=10
printOutInterval=1000
http.maxTotal=100
http.defaultMaxPerRoute=100
http.connectTimeout=5000
http.connectionRequestTimeout=10000
http.socketTimeout=-1
http.staleConnectionCheckEnabled=true
hos.logTypes=security_event,monitor_event,proxy_event,session_record,voip_record,assessment_event,transaction_record,troubleshooting
hos.logTypesFileTypesFileUrlFields=security_event:http-http_response_body&http_request_body,pacp-packet_capture_file,eml-mail_eml_file;proxy_event:http-http_response_body&http_request_body;session_record:http-http_response_body&http_request_body,pacp-packet_capture_file,eml-mail_eml_file;voip_record:pacp-rtp_pcap_path;assessment_event:other-assessment_file;transaction_record:http-http_response_body&http_request_body,eml-mail_eml_file;monitor_event:http-http_response_body&http_request_body,pacp-packet_capture_file,eml-mail_eml_file

View File

@@ -26,12 +26,12 @@ usage() {
echo " -s --startTime 起始时间。时间是UTC时间格式为yyyyMMdd、yyyy-MM-dd、yyyyMMddHHmmss默认是前一天的时间。"
echo " -e --endTime 结束时间。时间是UTC时间格式为yyyyMMdd、yyyy-MM-dd、yyyyMMddHHmmss默认是当前时间。"
echo " -c --count 评估的日志数量默认为1000最大值为100000。"
echo " -l --logType 评估指定日志的文件不指定该参数则评估所有日志支持评估多种日志使用逗号隔开例如session_record,security_event。支持的日志有security_event、proxy_event、session_record、voip_record、assessment_event、transaction_record、troubleshooting。"
echo " -f --fileType 指定文件的类型不指定该参数则为所有类型例如pcap。目前类型有mail、http、pcap、other。目前只有session_recordmail、http、pcap、security_eventmail、http、pcap、transaction_recordmail、http包含多种类型其他日志省略该参数即可。"
echo " -d --dataCenter 评估的数据中心可指定多个使用逗号隔开不指定为所有数据中心。只有security_event、monitor_event、proxy_event、session_record、voip_record支持选择数据中心"
echo " -l --logType 评估指定日志的文件不指定该参数则评估所有日志支持评估多种日志使用逗号隔开例如session_record,security_event。支持的日志有security_event、monitor_event、proxy_event、session_record、voip_record、assessment_event、transaction_record、troubleshooting。"
echo " -f --fileType 指定文件的类型不指定该参数则为所有类型例如pcap。目前类型有mail、http、pcap、other。目前只有session_recordmail、http、pcap、security_eventmail、http、pcap、monitor_eventmail、http、pcap、transaction_recordmail、http包含多种类型其他日志省略该参数即可。"
echo " -t --threads 线程数默认为1最大值为10。"
echo "combiner options:"
echo " -j --job 要验证的任务有traffic、troubleshooting、allall为都验证默认为all。"
echo " -p --prefix 文件名前缀,防止多次执行文件名重复,不可省略。"
echo " -j --job 要验证的任务有traffic、troubleshooting都验证指定为traffic,troubleshooting不指定该参数默认为traffic。24.05已删除troubleshooting任务"
}
if [ $# -eq 0 ]; then
@@ -39,7 +39,7 @@ if [ $# -eq 0 ]; then
exit 0
fi
version="1.2"
version="1.3"
operation=$1
bucket=""
directory=""
@@ -51,7 +51,8 @@ count=1000
threads=1
logType=""
fileType=""
jobName="all"
dataCenter=""
jobName="traffic"
jar="galaxy-hos-util-"$version".jar"
shift
@@ -65,7 +66,11 @@ while getopts ":h:b:d:k:p:s:e:c:t:l:f:j:" opt; do
bucket=$OPTARG
;;
d)
directory=$OPTARG
if [ "$operation" == "check" ]; then
dataCenter=$OPTARG
else
directory=$OPTARG
fi
;;
k)
keys=$OPTARG
@@ -122,11 +127,11 @@ java -jar $jar upload $bucket $directory threadNum=$threads
}
check() {
java -jar $jar check logType=$logType fileType=$fileType maxLogs=$count timeRange=$startTime/$endTime threadNum=$threads
java -jar $jar check dataCenter=$dataCenter logType=$logType fileType=$fileType maxLogs=$count timeRange=$startTime/$endTime threadNum=$threads
}
combiner() {
java -jar $jar combiner $jobName $prefix
java -jar $jar combiner $jobName
}
if [ "$operation" = "download" ];then