2020-06-18 18:20:43 +08:00
|
|
|
|
*** Settings ***
|
|
|
|
|
|
Test Teardown TeardownDelete ${reportId} ${report_url} ${chartId} ${chart_url} ${datasetId} ${dataset_url} ${resultId} ${result_url}
|
|
|
|
|
|
Force Tags tsg_bf_api chartlibrary_create report
|
|
|
|
|
|
Library OperatingSystem
|
|
|
|
|
|
Resource ../../../03-Variable/BifangApiVariable.txt
|
2020-06-19 11:35:37 +08:00
|
|
|
|
Resource ../../../02-Keyword/tsg_bfapi/Common.robot
|
2020-06-18 18:20:43 +08:00
|
|
|
|
Resource ../../../02-Keyword/tsg_bfapi/offline_stat_report/ApiRequest1.robot
|
2020-06-22 19:33:59 +08:00
|
|
|
|
Resource ../../../02-Keyword/tsg_bfapi/offline_stat_report/InsertFile.robot
|
2020-06-18 18:20:43 +08:00
|
|
|
|
|
|
|
|
|
|
*** Variables ***
|
2020-06-19 11:35:37 +08:00
|
|
|
|
${dataset_url} /${version}/report/dataset
|
2020-06-18 18:20:43 +08:00
|
|
|
|
${datasetId} ${EMPTY}
|
|
|
|
|
|
${reportId} ${EMPTY}
|
2020-06-19 11:35:37 +08:00
|
|
|
|
${report_url} /${version}/report/offlinejob
|
2020-06-18 18:20:43 +08:00
|
|
|
|
${chartId} ${EMPTY}
|
2020-06-19 11:35:37 +08:00
|
|
|
|
${chart_url} /${version}/report/chart
|
|
|
|
|
|
${result_url} /${version}/report/offlinejob/result
|
2020-06-22 19:33:59 +08:00
|
|
|
|
${resultId} ${EMPTY}
|
2020-06-18 18:20:43 +08:00
|
|
|
|
*** Test Cases ***
|
|
|
|
|
|
Report_Dashboard_Result-001
|
|
|
|
|
|
#新建DataSet,统计通联日志中的字节
|
|
|
|
|
|
${name} Set Variable Report_Dashboard_Result-001
|
2020-06-19 11:35:37 +08:00
|
|
|
|
BasePostRequestOK ${dataset_url} {"list":{"name":"${name}","logType":"connection_record_log","filterConnector":"and","groupColumnList":[{"name":"common_recv_time"}],"queryColumnList":[{"name":"common_c2s_byte_num","expression":"sum","label":"Bytes Sent","expressionList":[{"label":"sum","value":"sum"},{"label":"min","value":"min"},{"label":"max","value":"max"},{"label":"avg","value":"avg"},{"label":"count","value":"count"}]},{"name":"common_s2c_byte_num","expression":"sum","label":"Bytes Received","expressionList":[{"label":"sum","value":"sum"},{"label":"min","value":"min"},{"label":"max","value":"max"},{"label":"avg","value":"avg"},{"label":"count","value":"count"}]},{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_recv_time","expression":"","label":"Receive Time"}],"filterConditionList":[]}}
|
2020-06-18 18:20:43 +08:00
|
|
|
|
#根据name查询出该Dataset的id
|
2020-06-19 11:35:37 +08:00
|
|
|
|
${response} BaseGetRequestOK ${dataset_url} pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
2020-06-18 18:20:43 +08:00
|
|
|
|
${datasetId} Set Variable ${response}[data][list][0][id]
|
|
|
|
|
|
#根据DataSet的id,新建Chart,Lien图形表
|
2020-06-19 11:35:37 +08:00
|
|
|
|
BasePostRequestOK ${chart_url} {"list":{"id":null,"name":"${name}","description":"","datasetId":${datasetId},"chartType":"line","dataTop":0,"orderBy":"","orderDesc":1,"drilldownTop":0,"includeOther":false,"timeline":{"dataBinding":"Receive Time","label":"","format":"Time"},"line":[{"dataBinding":"Bytes Sent","type":"Line Up","format":"Default","legend":""},{"dataBinding":"Bytes Received","type":"Line Up","format":"Default","legend":""},{"dataBinding":"sessions","type":"Line Up","format":"Default","legend":""}]}}
|
2020-06-18 18:20:43 +08:00
|
|
|
|
#根据name查询出该Chart的id
|
2020-06-19 11:35:37 +08:00
|
|
|
|
${response1} BaseGetRequestOK ${chart_url} pageSize=20&pageNo=1&id=&name=${name}&opUser=
|
2020-06-18 18:20:43 +08:00
|
|
|
|
${chartId} Set Variable ${response1}[data][list][0][id]
|
|
|
|
|
|
#新建Report,时间计划为Today,图表引用Line。
|
2020-06-19 11:35:37 +08:00
|
|
|
|
BasePostRequestOK ${report_url} {"reportJobList":{"rangeType":"yesterday","rangeInterval":1,"jobName":"${name}","scheduleId":"","chartList":[{"chartId":${chartId},"timeGranulartiy":5,"timeUnit":"minute","disabled":false}],"isNotice":0,"noticeMethod":"","receiver":[],"startTime":"","endTime":"","filterConnector":"and","filterCondition":[]}}
|
2020-06-18 18:20:43 +08:00
|
|
|
|
#查询Report的id
|
2020-06-19 11:35:37 +08:00
|
|
|
|
${response1} BaseGetRequestOK ${report_url} pageSize=20&pageNo=1&jobIds=&jobName=${name}&opStartTime=&opEndTime=&opUser=&scheduleId=
|
2020-06-18 18:20:43 +08:00
|
|
|
|
${reportId} Set Variable ${response1}[data][list][0][jobId]
|
2020-06-22 19:33:59 +08:00
|
|
|
|
#通过report的id,生成report报表
|
|
|
|
|
|
#BasePostRequestOK ${report_url} {"jobId":${reportId}}
|
2020-06-18 18:20:43 +08:00
|
|
|
|
#查询Report结果的状态,并判断状态结果,如果状态是执行成功,查看report结果内容
|
|
|
|
|
|
FOR ${i} IN RANGE 50
|
|
|
|
|
|
sleep 10
|
|
|
|
|
|
#report执行状态查询
|
2020-06-19 11:35:37 +08:00
|
|
|
|
${response1} BaseGetRequestOK ${result_url} jobId=${reportId}
|
2020-06-18 18:20:43 +08:00
|
|
|
|
${status} Set Variable ${response1}[data][list][0][status]
|
|
|
|
|
|
${resultId} Set Variable ${response1}[data][list][0][resultId]
|
|
|
|
|
|
run keyword if "${status}"=="0" log non-execution
|
|
|
|
|
|
... ELSE IF "${status}"=="1" log executing
|
|
|
|
|
|
... ELSE IF "${status}"=="2" Exit For Loop
|
|
|
|
|
|
... ELSE log Exec failure
|
|
|
|
|
|
END
|
|
|
|
|
|
#Report报表详情查询
|
2020-06-22 19:33:59 +08:00
|
|
|
|
${response1} BaseGetRequestOK ${result_url}/detail resultId=${resultId}&jobId=${reportId}
|
|
|
|
|
|
InsertFile datasetId ${datasetId}
|
|
|
|
|
|
InsertFile chartId ${chartId}
|
|
|
|
|
|
InsertFile reportId ${reportId}
|
|
|
|
|
|
InsertFile resultId ${resultId}
|
2020-06-18 18:20:43 +08:00
|
|
|
|
Report_Dashboard_Result-002
|
|
|
|
|
|
#新建DataSet,统计通联日志中的包数
|
|
|
|
|
|
${name} Set Variable Report_Dashboard_Result-002
|
2020-06-19 11:35:37 +08:00
|
|
|
|
BasePostRequestOK ${dataset_url} {"list":{"name":"${name}","logType":"connection_record_log","filterConnector":"and","groupColumnList":[{"name":"common_recv_time"}],"queryColumnList":[{"name":"common_c2s_pkt_num","expression":"sum","label":"Packets Sent","expressionList":[{"label":"sum","value":"sum"},{"label":"min","value":"min"},{"label":"max","value":"max"},{"label":"avg","value":"avg"},{"label":"count","value":"count"}]},{"name":"common_s2c_pkt_num","expression":"sum","label":"Packets Received","expressionList":[{"label":"sum","value":"sum"},{"label":"min","value":"min"},{"label":"max","value":"max"},{"label":"avg","value":"avg"},{"label":"count","value":"count"}]},{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_recv_time","expression":"","label":"Receive Time"}],"filterConditionList":[]}}
|
2020-06-18 18:20:43 +08:00
|
|
|
|
#根据name查询出该Dataset的id
|
2020-06-19 11:35:37 +08:00
|
|
|
|
${response} BaseGetRequestOK ${dataset_url} pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
2020-06-18 18:20:43 +08:00
|
|
|
|
${datasetId} Set Variable ${response}[data][list][0][id]
|
|
|
|
|
|
#根据DataSet的id,新建Chart,Lien图形表
|
2020-06-19 11:35:37 +08:00
|
|
|
|
BasePostRequestOK ${chart_url} {"list":{"id":null,"name":"${name}","description":"","datasetId":${datasetId},"chartType":"line","dataTop":0,"orderBy":"","orderDesc":1,"drilldownTop":0,"includeOther":false,"timeline":{"dataBinding":"Receive Time","label":"","format":"Time"},"line":[{"dataBinding":"Packets Sent","type":"Line Up","format":"Default","legend":""},{"dataBinding":"Packets Received","type":"Line Up","format":"Default","legend":""},{"dataBinding":"sessions","type":"Line Up","format":"Default","legend":""}]}}
|
2020-06-18 18:20:43 +08:00
|
|
|
|
#根据name查询出该Chart的id
|
2020-06-19 11:35:37 +08:00
|
|
|
|
${response1} BaseGetRequestOK ${chart_url} pageSize=20&pageNo=1&id=&name=${name}&opUser=
|
2020-06-18 18:20:43 +08:00
|
|
|
|
${chartId} Set Variable ${response1}[data][list][0][id]
|
|
|
|
|
|
#新建Report,时间计划为Today,图表引用Line。
|
2020-06-19 11:35:37 +08:00
|
|
|
|
BasePostRequestOK ${report_url} {"reportJobList":{"rangeType":"yesterday","rangeInterval":1,"jobName":"${name}","scheduleId":"","chartList":[{"chartId":${chartId},"timeGranulartiy":5,"timeUnit":"minute","disabled":false}],"isNotice":0,"noticeMethod":"","receiver":[],"startTime":"","endTime":"","filterConnector":"and","filterCondition":[]}}
|
2020-06-18 18:20:43 +08:00
|
|
|
|
#查询Report的id
|
2020-06-19 11:35:37 +08:00
|
|
|
|
${response1} BaseGetRequestOK ${report_url} pageSize=20&pageNo=1&jobIds=&jobName=${name}&opStartTime=&opEndTime=&opUser=&scheduleId=
|
2020-06-18 18:20:43 +08:00
|
|
|
|
${reportId} Set Variable ${response1}[data][list][0][jobId]
|
2020-06-22 19:33:59 +08:00
|
|
|
|
#通过report的id,生成report报表
|
|
|
|
|
|
#BasePostRequestOK ${report_url} {"jobId":${reportId}}
|
2020-06-18 18:20:43 +08:00
|
|
|
|
#查询Report结果的状态,并判断状态结果,如果状态是执行成功,查看report结果内容
|
|
|
|
|
|
FOR ${i} IN RANGE 50
|
|
|
|
|
|
sleep 10
|
|
|
|
|
|
#report执行状态查询
|
2020-06-19 11:35:37 +08:00
|
|
|
|
${response1} BaseGetRequestOK ${result_url} jobId=${reportId}
|
2020-06-18 18:20:43 +08:00
|
|
|
|
${status} Set Variable ${response1}[data][list][0][status]
|
|
|
|
|
|
${resultId} Set Variable ${response1}[data][list][0][resultId]
|
|
|
|
|
|
run keyword if "${status}"=="0" log non-execution
|
|
|
|
|
|
... ELSE IF "${status}"=="1" log executing
|
|
|
|
|
|
... ELSE IF "${status}"=="2" Exit For Loop
|
|
|
|
|
|
... ELSE log Exec failure
|
|
|
|
|
|
END
|
|
|
|
|
|
#Report报表详情查询
|
2020-06-22 19:33:59 +08:00
|
|
|
|
${response1} BaseGetRequestOK ${result_url}/detail resultId=${resultId}&jobId=${reportId}
|
|
|
|
|
|
InsertFile datasetId ${datasetId}
|
|
|
|
|
|
InsertFile chartId ${chartId}
|
|
|
|
|
|
InsertFile reportId ${reportId}
|
|
|
|
|
|
InsertFile resultId ${resultId}
|
2020-06-18 18:20:43 +08:00
|
|
|
|
|
|
|
|
|
|
Report_Dashboard_Result-003
|
|
|
|
|
|
#新建DataSet,统计通联日志中前24小时会话数
|
|
|
|
|
|
${name} Set Variable Report_Dashboard_Result-003
|
2020-06-19 11:35:37 +08:00
|
|
|
|
BasePostRequestOK ${dataset_url} {"list":{"name":"${name}","logType":"connection_record_log","filterConnector":"and","groupColumnList":[{"name":"common_recv_time"}],"queryColumnList":[{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_recv_time","expression":"","label":"Receive Time"}],"filterConditionList":[]}}
|
2020-06-18 18:20:43 +08:00
|
|
|
|
#根据name查询出该Dataset的id
|
2020-06-19 11:35:37 +08:00
|
|
|
|
${response} BaseGetRequestOK ${dataset_url} pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
2020-06-18 18:20:43 +08:00
|
|
|
|
${datasetId} Set Variable ${response}[data][list][0][id]
|
|
|
|
|
|
#根据DataSet的id,新建Chart,Lien图形表
|
2020-06-19 11:35:37 +08:00
|
|
|
|
BasePostRequestOK ${chart_url} {"list":{"id":null,"name":"${name}","description":"","datasetId":${datasetId},"chartType":"line","dataTop":0,"orderBy":"","orderDesc":1,"drilldownTop":0,"includeOther":false,"timeline":{"dataBinding":"Receive Time","label":"","format":"Time"},"line":[{"dataBinding":"sessions","type":"Line Up","format":"Default","legend":""}]}}
|
2020-06-18 18:20:43 +08:00
|
|
|
|
#根据name查询出该Chart的id
|
2020-06-19 11:35:37 +08:00
|
|
|
|
${response1} BaseGetRequestOK ${chart_url} pageSize=20&pageNo=1&id=&name=${name}&opUser=
|
2020-06-18 18:20:43 +08:00
|
|
|
|
${chartId} Set Variable ${response1}[data][list][0][id]
|
|
|
|
|
|
#新建Report,时间计划为Today,图表引用Line。
|
2020-06-19 11:35:37 +08:00
|
|
|
|
BasePostRequestOK ${report_url} {"reportJobList":{"rangeType":"last","rangeInterval":24,"jobName":"${name}","scheduleId":"","chartList":[{"chartId":${chartId},"timeGranulartiy":1,"timeUnit":"","disabled":false}],"isNotice":0,"noticeMethod":"","receiver":[],"startTime":"","endTime":"","filterConnector":"and","filterCondition":[],"rangeUnit":"hour"}}
|
2020-06-18 18:20:43 +08:00
|
|
|
|
#查询Report的id
|
2020-06-19 11:35:37 +08:00
|
|
|
|
${response1} BaseGetRequestOK ${report_url} pageSize=20&pageNo=1&jobIds=&jobName=${name}&opStartTime=&opEndTime=&opUser=&scheduleId=
|
2020-06-18 18:20:43 +08:00
|
|
|
|
${reportId} Set Variable ${response1}[data][list][0][jobId]
|
2020-06-22 19:33:59 +08:00
|
|
|
|
#通过report的id,生成report报表
|
|
|
|
|
|
#BasePostRequestOK ${report_url} {"jobId":${reportId}}
|
2020-06-18 18:20:43 +08:00
|
|
|
|
#查询Report结果的状态,并判断状态结果,如果状态是执行成功,查看report结果内容
|
|
|
|
|
|
FOR ${i} IN RANGE 50
|
|
|
|
|
|
sleep 10
|
|
|
|
|
|
#report执行状态查询
|
2020-06-19 11:35:37 +08:00
|
|
|
|
${response1} BaseGetRequestOK ${result_url} jobId=${reportId}
|
2020-06-18 18:20:43 +08:00
|
|
|
|
${status} Set Variable ${response1}[data][list][0][status]
|
|
|
|
|
|
${resultId} Set Variable ${response1}[data][list][0][resultId]
|
|
|
|
|
|
run keyword if "${status}"=="0" log non-execution
|
|
|
|
|
|
... ELSE IF "${status}"=="1" log executing
|
|
|
|
|
|
... ELSE IF "${status}"=="2" Exit For Loop
|
|
|
|
|
|
... ELSE log Exec failure
|
|
|
|
|
|
END
|
|
|
|
|
|
#Report报表详情查询
|
2020-06-22 19:33:59 +08:00
|
|
|
|
${response1} BaseGetRequestOK ${result_url}/detail resultId=${resultId}&jobId=${reportId}
|
|
|
|
|
|
|
|
|
|
|
|
InsertFile datasetId ${datasetId}
|
|
|
|
|
|
InsertFile chartId ${chartId}
|
|
|
|
|
|
InsertFile reportId ${reportId}
|
|
|
|
|
|
InsertFile resultId ${resultId}
|
2020-06-18 18:20:43 +08:00
|
|
|
|
|
|
|
|
|
|
Report_Dashboard_Result-004
|
|
|
|
|
|
#新建DataSet,统计安全日志里的前一天的Allow动作的会话数和包数
|
|
|
|
|
|
${name} Set Variable Report_Dashboard_Result-004
|
2020-06-19 11:35:37 +08:00
|
|
|
|
BasePostRequestOK ${dataset_url} {"list":{"name":"${name}","logType":"security_event_log","filterConnector":"and","groupColumnList":[{"name":"common_recv_time"}],"queryColumnList":[{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_c2s_pkt_num","expression":"sum","label":"Packets Sent","expressionList":[{"label":"sum","value":"sum"},{"label":"min","value":"min"},{"label":"max","value":"max"},{"label":"avg","value":"avg"},{"label":"count","value":"count"}]},{"name":"common_s2c_pkt_num","expression":"sum","label":"Packets Received","expressionList":[{"label":"sum","value":"sum"},{"label":"min","value":"min"},{"label":"max","value":"max"},{"label":"avg","value":"avg"},{"label":"count","value":"count"}]},{"name":"common_recv_time","expression":"","label":"Receive Time"}],"filterConditionList":[{"name":"common_action","expression":"=","expressionList":["=","!=",">","<",">=","<="],"value":[128],"type":"int"}]}}
|
2020-06-18 18:20:43 +08:00
|
|
|
|
#根据name查询出该Dataset的id
|
2020-06-19 11:35:37 +08:00
|
|
|
|
${response} BaseGetRequestOK ${dataset_url} pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
2020-06-18 18:20:43 +08:00
|
|
|
|
${datasetId} Set Variable ${response}[data][list][0][id]
|
|
|
|
|
|
#根据DataSet的id,新建Chart,Lien图形表
|
2020-06-19 11:35:37 +08:00
|
|
|
|
BasePostRequestOK ${chart_url} {"list":{"id":null,"name":"${name}","description":"","datasetId":${datasetId},"chartType":"line","dataTop":0,"orderBy":"","orderDesc":1,"drilldownTop":0,"includeOther":false,"timeline":{"dataBinding":"Receive Time","label":"","format":"Time"},"line":[{"dataBinding":"Packets Received","type":"Line Up","format":"Default","legend":""},{"dataBinding":"Packets Sent","type":"Line Up","format":"Default","legend":""},{"dataBinding":"sessions","type":"Line Up","format":"Default","legend":""}]}}
|
2020-06-18 18:20:43 +08:00
|
|
|
|
#根据name查询出该Chart的id
|
2020-06-19 11:35:37 +08:00
|
|
|
|
${response1} BaseGetRequestOK ${chart_url} pageSize=20&pageNo=1&id=&name=${name}&opUser=
|
2020-06-18 18:20:43 +08:00
|
|
|
|
${chartId} Set Variable ${response1}[data][list][0][id]
|
|
|
|
|
|
#新建Report,时间计划为Today,图表引用Line。
|
2020-06-19 11:35:37 +08:00
|
|
|
|
BasePostRequestOK ${report_url} {"reportJobList":{"rangeType":"yesterday","rangeInterval":1,"jobName":"${name}","scheduleId":"","chartList":[{"chartId":${chartId},"timeGranulartiy":5,"timeUnit":"minute","disabled":false}],"isNotice":0,"noticeMethod":"","receiver":[],"startTime":"","endTime":"","filterConnector":"and","filterCondition":[]}}
|
2020-06-18 18:20:43 +08:00
|
|
|
|
#查询Report的id
|
2020-06-19 11:35:37 +08:00
|
|
|
|
${response1} BaseGetRequestOK ${report_url} pageSize=20&pageNo=1&jobIds=&jobName=${name}&opStartTime=&opEndTime=&opUser=&scheduleId=
|
2020-06-18 18:20:43 +08:00
|
|
|
|
${reportId} Set Variable ${response1}[data][list][0][jobId]
|
2020-06-22 19:33:59 +08:00
|
|
|
|
#通过report的id,生成report报表
|
|
|
|
|
|
#BasePostRequestOK ${report_url} {"jobId":${reportId}}
|
2020-06-18 18:20:43 +08:00
|
|
|
|
#查询Report结果的状态,并判断状态结果,如果状态是执行成功,查看report结果内容
|
|
|
|
|
|
FOR ${i} IN RANGE 50
|
|
|
|
|
|
sleep 10
|
|
|
|
|
|
#report执行状态查询
|
2020-06-19 11:35:37 +08:00
|
|
|
|
${response1} BaseGetRequestOK ${result_url} jobId=${reportId}
|
2020-06-18 18:20:43 +08:00
|
|
|
|
${status} Set Variable ${response1}[data][list][0][status]
|
|
|
|
|
|
${resultId} Set Variable ${response1}[data][list][0][resultId]
|
|
|
|
|
|
run keyword if "${status}"=="0" log non-execution
|
|
|
|
|
|
... ELSE IF "${status}"=="1" log executing
|
|
|
|
|
|
... ELSE IF "${status}"=="2" Exit For Loop
|
|
|
|
|
|
... ELSE log Exec failure
|
|
|
|
|
|
END
|
|
|
|
|
|
#Report报表详情查询
|
2020-06-22 19:33:59 +08:00
|
|
|
|
${response1} BaseGetRequestOK ${result_url}/detail resultId=${resultId}&jobId=${reportId}
|
|
|
|
|
|
|
|
|
|
|
|
InsertFile datasetId ${datasetId}
|
|
|
|
|
|
InsertFile chartId ${chartId}
|
|
|
|
|
|
InsertFile reportId ${reportId}
|
|
|
|
|
|
InsertFile resultId ${resultId}
|
2020-06-18 18:20:43 +08:00
|
|
|
|
|
|
|
|
|
|
Report_Dashboard_Result-005
|
|
|
|
|
|
#新建DataSet,统计安全日志里的前一天的Allow动作的会话数和字节数
|
|
|
|
|
|
${name} Set Variable Report_Dashboard_Result-005
|
2020-06-19 11:35:37 +08:00
|
|
|
|
BasePostRequestOK ${dataset_url} {"list":{"name":"${name}","logType":"security_event_log","filterConnector":"and","groupColumnList":[{"name":"common_recv_time"}],"queryColumnList":[{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_c2s_byte_num","expression":"sum","label":"Bytes Sent","expressionList":[{"label":"sum","value":"sum"},{"label":"min","value":"min"},{"label":"max","value":"max"},{"label":"avg","value":"avg"},{"label":"count","value":"count"}]},{"name":"common_s2c_byte_num","expression":"sum","label":"Bytes Received","expressionList":[{"label":"sum","value":"sum"},{"label":"min","value":"min"},{"label":"max","value":"max"},{"label":"avg","value":"avg"},{"label":"count","value":"count"}]},{"name":"common_recv_time","expression":"","label":"Receive Time"}],"filterConditionList":[{"name":"common_action","expression":"=","expressionList":["=","!=",">","<",">=","<="],"value":[128],"type":"int"}]}}
|
2020-06-18 18:20:43 +08:00
|
|
|
|
#根据name查询出该Dataset的id
|
2020-06-19 11:35:37 +08:00
|
|
|
|
${response} BaseGetRequestOK ${dataset_url} pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
2020-06-18 18:20:43 +08:00
|
|
|
|
${datasetId} Set Variable ${response}[data][list][0][id]
|
|
|
|
|
|
#根据DataSet的id,新建Chart,Lien图形表
|
2020-06-19 11:35:37 +08:00
|
|
|
|
BasePostRequestOK ${chart_url} {"list":{"id":null,"name":"${name}","description":"","datasetId":${datasetId},"chartType":"line","dataTop":0,"orderBy":"","orderDesc":1,"drilldownTop":0,"includeOther":false,"timeline":{"dataBinding":"Receive Time","label":"","format":"Time"},"line":[{"dataBinding":"Bytes Sent","type":"Line Up","format":"Default","legend":""},{"dataBinding":"Bytes Received","type":"Line Up","format":"Default","legend":""},{"dataBinding":"sessions","type":"Line Up","format":"Default","legend":""}]}}
|
2020-06-18 18:20:43 +08:00
|
|
|
|
#根据name查询出该Chart的id
|
2020-06-19 11:35:37 +08:00
|
|
|
|
${response1} BaseGetRequestOK ${chart_url} pageSize=20&pageNo=1&id=&name=${name}&opUser=
|
2020-06-18 18:20:43 +08:00
|
|
|
|
${chartId} Set Variable ${response1}[data][list][0][id]
|
|
|
|
|
|
#新建Report,时间计划为Today,图表引用Line。
|
2020-06-19 11:35:37 +08:00
|
|
|
|
BasePostRequestOK ${report_url} {"reportJobList":{"rangeType":"yesterday","rangeInterval":1,"jobName":"${name}","scheduleId":"","chartList":[{"chartId":${chartId},"timeGranulartiy":5,"timeUnit":"minute","disabled":false}],"isNotice":0,"noticeMethod":"","receiver":[],"startTime":"","endTime":"","filterConnector":"and","filterCondition":[]}}
|
2020-06-18 18:20:43 +08:00
|
|
|
|
#查询Report的id
|
2020-06-19 11:35:37 +08:00
|
|
|
|
${response1} BaseGetRequestOK ${report_url} pageSize=20&pageNo=1&jobIds=&jobName=${name}&opStartTime=&opEndTime=&opUser=&scheduleId=
|
2020-06-18 18:20:43 +08:00
|
|
|
|
${reportId} Set Variable ${response1}[data][list][0][jobId]
|
2020-06-22 19:33:59 +08:00
|
|
|
|
#通过report的id,生成report报表
|
|
|
|
|
|
#BasePostRequestOK ${report_url} {"jobId":${reportId}}
|
2020-06-18 18:20:43 +08:00
|
|
|
|
#查询Report结果的状态,并判断状态结果,如果状态是执行成功,查看report结果内容
|
|
|
|
|
|
FOR ${i} IN RANGE 50
|
|
|
|
|
|
sleep 10
|
|
|
|
|
|
#report执行状态查询
|
2020-06-19 11:35:37 +08:00
|
|
|
|
${response1} BaseGetRequestOK ${result_url} jobId=${reportId}
|
2020-06-18 18:20:43 +08:00
|
|
|
|
${status} Set Variable ${response1}[data][list][0][status]
|
|
|
|
|
|
${resultId} Set Variable ${response1}[data][list][0][resultId]
|
|
|
|
|
|
run keyword if "${status}"=="0" log non-execution
|
|
|
|
|
|
... ELSE IF "${status}"=="1" log executing
|
|
|
|
|
|
... ELSE IF "${status}"=="2" Exit For Loop
|
|
|
|
|
|
... ELSE log Exec failure
|
|
|
|
|
|
END
|
|
|
|
|
|
#Report报表详情查询
|
2020-06-22 19:33:59 +08:00
|
|
|
|
${response1} BaseGetRequestOK ${result_url}/detail resultId=${resultId}&jobId=${reportId}
|
|
|
|
|
|
|
|
|
|
|
|
InsertFile datasetId ${datasetId}
|
|
|
|
|
|
InsertFile chartId ${chartId}
|
|
|
|
|
|
InsertFile reportId ${reportId}
|
|
|
|
|
|
InsertFile resultId ${resultId}
|
2020-06-18 18:20:43 +08:00
|
|
|
|
|
|
|
|
|
|
Report_Dashboard_Result-006
|
|
|
|
|
|
#新建DataSet,统计安全日志里的前一天的Deny动作的会话数和包数
|
|
|
|
|
|
${name} Set Variable Report_Dashboard_Result-006
|
2020-06-19 11:35:37 +08:00
|
|
|
|
BasePostRequestOK ${dataset_url} {"list":{"name":"${name}","logType":"security_event_log","filterConnector":"and","groupColumnList":[{"name":"common_recv_time"}],"queryColumnList":[{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_c2s_pkt_num","expression":"sum","label":"Packets Sent","expressionList":[{"label":"sum","value":"sum"},{"label":"min","value":"min"},{"label":"max","value":"max"},{"label":"avg","value":"avg"},{"label":"count","value":"count"}]},{"name":"common_s2c_pkt_num","expression":"sum","label":"Packets Received","expressionList":[{"label":"sum","value":"sum"},{"label":"min","value":"min"},{"label":"max","value":"max"},{"label":"avg","value":"avg"},{"label":"count","value":"count"}]},{"name":"common_recv_time","expression":"","label":"Receive Time"}],"filterConditionList":[{"name":"common_action","expression":"=","expressionList":["=","!=",">","<",">=","<="],"value":[16],"type":"int"}]}}
|
2020-06-18 18:20:43 +08:00
|
|
|
|
#根据name查询出该Dataset的id
|
2020-06-19 11:35:37 +08:00
|
|
|
|
${response} BaseGetRequestOK ${dataset_url} pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
2020-06-18 18:20:43 +08:00
|
|
|
|
${datasetId} Set Variable ${response}[data][list][0][id]
|
|
|
|
|
|
#根据DataSet的id,新建Chart,Lien图形表
|
2020-06-19 11:35:37 +08:00
|
|
|
|
BasePostRequestOK ${chart_url} {"list":{"id":null,"name":"${name}","description":"","datasetId":${datasetId},"chartType":"line","dataTop":0,"orderBy":"","orderDesc":1,"drilldownTop":0,"includeOther":false,"timeline":{"dataBinding":"Receive Time","label":"","format":"Time"},"line":[{"dataBinding":"Packets Received","type":"Line Up","format":"Default","legend":""},{"dataBinding":"Packets Sent","type":"Line Up","format":"Default","legend":""},{"dataBinding":"sessions","type":"Line Up","format":"Default","legend":""}]}}
|
2020-06-18 18:20:43 +08:00
|
|
|
|
#根据name查询出该Chart的id
|
2020-06-19 11:35:37 +08:00
|
|
|
|
${response1} BaseGetRequestOK ${chart_url} pageSize=20&pageNo=1&id=&name=${name}&opUser=
|
2020-06-18 18:20:43 +08:00
|
|
|
|
${chartId} Set Variable ${response1}[data][list][0][id]
|
|
|
|
|
|
#新建Report,时间计划为Today,图表引用Line。
|
2020-06-19 11:35:37 +08:00
|
|
|
|
BasePostRequestOK ${report_url} {"reportJobList":{"rangeType":"yesterday","rangeInterval":1,"jobName":"${name}","scheduleId":"","chartList":[{"chartId":${chartId},"timeGranulartiy":5,"timeUnit":"minute","disabled":false}],"isNotice":0,"noticeMethod":"","receiver":[],"startTime":"","endTime":"","filterConnector":"and","filterCondition":[]}}
|
2020-06-18 18:20:43 +08:00
|
|
|
|
#查询Report的id
|
2020-06-19 11:35:37 +08:00
|
|
|
|
${response1} BaseGetRequestOK ${report_url} pageSize=20&pageNo=1&jobIds=&jobName=${name}&opStartTime=&opEndTime=&opUser=&scheduleId=
|
2020-06-18 18:20:43 +08:00
|
|
|
|
${reportId} Set Variable ${response1}[data][list][0][jobId]
|
2020-06-22 19:33:59 +08:00
|
|
|
|
#通过report的id,生成report报表
|
|
|
|
|
|
#BasePostRequestOK ${report_url} {"jobId":${reportId}}
|
2020-06-18 18:20:43 +08:00
|
|
|
|
#查询Report结果的状态,并判断状态结果,如果状态是执行成功,查看report结果内容
|
|
|
|
|
|
FOR ${i} IN RANGE 50
|
|
|
|
|
|
sleep 10
|
|
|
|
|
|
#report执行状态查询
|
2020-06-19 11:35:37 +08:00
|
|
|
|
${response1} BaseGetRequestOK ${result_url} jobId=${reportId}
|
2020-06-18 18:20:43 +08:00
|
|
|
|
${status} Set Variable ${response1}[data][list][0][status]
|
|
|
|
|
|
${resultId} Set Variable ${response1}[data][list][0][resultId]
|
|
|
|
|
|
run keyword if "${status}"=="0" log non-execution
|
|
|
|
|
|
... ELSE IF "${status}"=="1" log executing
|
|
|
|
|
|
... ELSE IF "${status}"=="2" Exit For Loop
|
|
|
|
|
|
... ELSE log Exec failure
|
|
|
|
|
|
END
|
|
|
|
|
|
#Report报表详情查询
|
2020-06-22 19:33:59 +08:00
|
|
|
|
${response1} BaseGetRequestOK ${result_url}/detail resultId=${resultId}&jobId=${reportId}
|
|
|
|
|
|
|
|
|
|
|
|
InsertFile datasetId ${datasetId}
|
|
|
|
|
|
InsertFile chartId ${chartId}
|
|
|
|
|
|
InsertFile reportId ${reportId}
|
|
|
|
|
|
InsertFile resultId ${resultId}
|
2020-06-18 18:20:43 +08:00
|
|
|
|
|
|
|
|
|
|
Report_Dashboard_Result-007
|
|
|
|
|
|
#新建DataSet,统计安全日志里的前一天的Deny动作的会话数和字节数
|
|
|
|
|
|
${name} Set Variable Report_Dashboard_Result-007
|
2020-06-19 11:35:37 +08:00
|
|
|
|
BasePostRequestOK ${dataset_url} {"list":{"name":"${name}","logType":"security_event_log","filterConnector":"and","groupColumnList":[{"name":"common_recv_time"}],"queryColumnList":[{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_c2s_byte_num","expression":"sum","label":"Bytes Sent","expressionList":[{"label":"sum","value":"sum"},{"label":"min","value":"min"},{"label":"max","value":"max"},{"label":"avg","value":"avg"},{"label":"count","value":"count"}]},{"name":"common_s2c_byte_num","expression":"sum","label":"Bytes Received","expressionList":[{"label":"sum","value":"sum"},{"label":"min","value":"min"},{"label":"max","value":"max"},{"label":"avg","value":"avg"},{"label":"count","value":"count"}]},{"name":"common_recv_time","expression":"","label":"Receive Time"}],"filterConditionList":[{"name":"common_action","expression":"=","expressionList":["=","!=",">","<",">=","<="],"value":[16],"type":"int"}]}}
|
2020-06-18 18:20:43 +08:00
|
|
|
|
#根据name查询出该Dataset的id
|
2020-06-19 11:35:37 +08:00
|
|
|
|
${response} BaseGetRequestOK ${dataset_url} pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
2020-06-18 18:20:43 +08:00
|
|
|
|
${datasetId} Set Variable ${response}[data][list][0][id]
|
|
|
|
|
|
#根据DataSet的id,新建Chart,Lien图形表
|
2020-06-19 11:35:37 +08:00
|
|
|
|
BasePostRequestOK ${chart_url} {"list":{"id":null,"name":"${name}","description":"","datasetId":${datasetId},"chartType":"line","dataTop":0,"orderBy":"","orderDesc":1,"drilldownTop":0,"includeOther":false,"timeline":{"dataBinding":"Receive Time","label":"","format":"Time"},"line":[{"dataBinding":"Bytes Sent","type":"Line Up","format":"Default","legend":""},{"dataBinding":"Bytes Received","type":"Line Up","format":"Default","legend":""},{"dataBinding":"sessions","type":"Line Up","format":"Default","legend":""}]}}
|
2020-06-18 18:20:43 +08:00
|
|
|
|
#根据name查询出该Chart的id
|
2020-06-19 11:35:37 +08:00
|
|
|
|
${response1} BaseGetRequestOK ${chart_url} pageSize=20&pageNo=1&id=&name=${name}&opUser=
|
2020-06-18 18:20:43 +08:00
|
|
|
|
${chartId} Set Variable ${response1}[data][list][0][id]
|
|
|
|
|
|
#新建Report,时间计划为Today,图表引用Line。
|
2020-06-19 11:35:37 +08:00
|
|
|
|
BasePostRequestOK ${report_url} {"reportJobList":{"rangeType":"yesterday","rangeInterval":1,"jobName":"${name}","scheduleId":"","chartList":[{"chartId":${chartId},"timeGranulartiy":5,"timeUnit":"minute","disabled":false}],"isNotice":0,"noticeMethod":"","receiver":[],"startTime":"","endTime":"","filterConnector":"and","filterCondition":[]}}
|
2020-06-18 18:20:43 +08:00
|
|
|
|
#查询Report的id
|
2020-06-19 11:35:37 +08:00
|
|
|
|
${response1} BaseGetRequestOK ${report_url} pageSize=20&pageNo=1&jobIds=&jobName=${name}&opStartTime=&opEndTime=&opUser=&scheduleId=
|
2020-06-18 18:20:43 +08:00
|
|
|
|
${reportId} Set Variable ${response1}[data][list][0][jobId]
|
2020-06-22 19:33:59 +08:00
|
|
|
|
#通过report的id,生成report报表
|
|
|
|
|
|
#BasePostRequestOK ${report_url} {"jobId":${reportId}}
|
2020-06-18 18:20:43 +08:00
|
|
|
|
#查询Report结果的状态,并判断状态结果,如果状态是执行成功,查看report结果内容
|
|
|
|
|
|
FOR ${i} IN RANGE 50
|
|
|
|
|
|
sleep 10
|
|
|
|
|
|
#report执行状态查询
|
2020-06-19 11:35:37 +08:00
|
|
|
|
${response1} BaseGetRequestOK ${result_url} jobId=${reportId}
|
2020-06-18 18:20:43 +08:00
|
|
|
|
${status} Set Variable ${response1}[data][list][0][status]
|
|
|
|
|
|
${resultId} Set Variable ${response1}[data][list][0][resultId]
|
|
|
|
|
|
run keyword if "${status}"=="0" log non-execution
|
|
|
|
|
|
... ELSE IF "${status}"=="1" log executing
|
|
|
|
|
|
... ELSE IF "${status}"=="2" Exit For Loop
|
|
|
|
|
|
... ELSE log Exec failure
|
|
|
|
|
|
END
|
|
|
|
|
|
#Report报表详情查询
|
2020-06-22 19:33:59 +08:00
|
|
|
|
${response1} BaseGetRequestOK ${result_url}/detail resultId=${resultId}&jobId=${reportId}
|
|
|
|
|
|
|
|
|
|
|
|
InsertFile datasetId ${datasetId}
|
|
|
|
|
|
InsertFile chartId ${chartId}
|
|
|
|
|
|
InsertFile reportId ${reportId}
|
|
|
|
|
|
InsertFile resultId ${resultId}
|
2020-06-18 18:20:43 +08:00
|
|
|
|
|
|
|
|
|
|
Report_Dashboard_Result-008
|
|
|
|
|
|
#新建DataSet,统计安全日志里的前一天的Monitor动作的会话数和包数
|
|
|
|
|
|
${name} Set Variable Report_Dashboard_Result-008
|
2020-06-19 11:35:37 +08:00
|
|
|
|
BasePostRequestOK ${dataset_url} {"list":{"name":"${name}","logType":"security_event_log","filterConnector":"and","groupColumnList":[{"name":"common_recv_time"}],"queryColumnList":[{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_c2s_pkt_num","expression":"sum","label":"Packets Sent","expressionList":[{"label":"sum","value":"sum"},{"label":"min","value":"min"},{"label":"max","value":"max"},{"label":"avg","value":"avg"},{"label":"count","value":"count"}]},{"name":"common_s2c_pkt_num","expression":"sum","label":"Packets Received","expressionList":[{"label":"sum","value":"sum"},{"label":"min","value":"min"},{"label":"max","value":"max"},{"label":"avg","value":"avg"},{"label":"count","value":"count"}]},{"name":"common_recv_time","expression":"","label":"Receive Time"}],"filterConditionList":[{"name":"common_action","expression":"=","expressionList":["=","!=",">","<",">=","<="],"value":[1],"type":"int"}]}}
|
2020-06-18 18:20:43 +08:00
|
|
|
|
#根据name查询出该Dataset的id
|
2020-06-19 11:35:37 +08:00
|
|
|
|
${response} BaseGetRequestOK ${dataset_url} pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
2020-06-18 18:20:43 +08:00
|
|
|
|
${datasetId} Set Variable ${response}[data][list][0][id]
|
|
|
|
|
|
#根据DataSet的id,新建Chart,Lien图形表
|
2020-06-19 11:35:37 +08:00
|
|
|
|
BasePostRequestOK ${chart_url} {"list":{"id":null,"name":"${name}","description":"","datasetId":${datasetId},"chartType":"line","dataTop":0,"orderBy":"","orderDesc":1,"drilldownTop":0,"includeOther":false,"timeline":{"dataBinding":"Receive Time","label":"","format":"Time"},"line":[{"dataBinding":"Packets Received","type":"Line Up","format":"Default","legend":""},{"dataBinding":"Packets Sent","type":"Line Up","format":"Default","legend":""},{"dataBinding":"sessions","type":"Line Up","format":"Default","legend":""}]}}
|
2020-06-18 18:20:43 +08:00
|
|
|
|
#根据name查询出该Chart的id
|
2020-06-19 11:35:37 +08:00
|
|
|
|
${response1} BaseGetRequestOK ${chart_url} pageSize=20&pageNo=1&id=&name=${name}&opUser=
|
2020-06-18 18:20:43 +08:00
|
|
|
|
${chartId} Set Variable ${response1}[data][list][0][id]
|
|
|
|
|
|
#新建Report,时间计划为Today,图表引用Line。
|
2020-06-19 11:35:37 +08:00
|
|
|
|
BasePostRequestOK ${report_url} {"reportJobList":{"rangeType":"yesterday","rangeInterval":1,"jobName":"${name}","scheduleId":"","chartList":[{"chartId":${chartId},"timeGranulartiy":5,"timeUnit":"minute","disabled":false}],"isNotice":0,"noticeMethod":"","receiver":[],"startTime":"","endTime":"","filterConnector":"and","filterCondition":[]}}
|
2020-06-18 18:20:43 +08:00
|
|
|
|
#查询Report的id
|
2020-06-19 11:35:37 +08:00
|
|
|
|
${response1} BaseGetRequestOK ${report_url} pageSize=20&pageNo=1&jobIds=&jobName=${name}&opStartTime=&opEndTime=&opUser=&scheduleId=
|
2020-06-18 18:20:43 +08:00
|
|
|
|
${reportId} Set Variable ${response1}[data][list][0][jobId]
|
2020-06-22 19:33:59 +08:00
|
|
|
|
#通过report的id,生成report报表
|
|
|
|
|
|
#BasePostRequestOK ${report_url} {"jobId":${reportId}}
|
2020-06-18 18:20:43 +08:00
|
|
|
|
#查询Report结果的状态,并判断状态结果,如果状态是执行成功,查看report结果内容
|
|
|
|
|
|
FOR ${i} IN RANGE 50
|
|
|
|
|
|
sleep 10
|
|
|
|
|
|
#report执行状态查询
|
2020-06-19 11:35:37 +08:00
|
|
|
|
${response1} BaseGetRequestOK ${result_url} jobId=${reportId}
|
2020-06-18 18:20:43 +08:00
|
|
|
|
${status} Set Variable ${response1}[data][list][0][status]
|
|
|
|
|
|
${resultId} Set Variable ${response1}[data][list][0][resultId]
|
|
|
|
|
|
run keyword if "${status}"=="0" log non-execution
|
|
|
|
|
|
... ELSE IF "${status}"=="1" log executing
|
|
|
|
|
|
... ELSE IF "${status}"=="2" Exit For Loop
|
|
|
|
|
|
... ELSE log Exec failure
|
|
|
|
|
|
END
|
|
|
|
|
|
#Report报表详情查询
|
2020-06-22 19:33:59 +08:00
|
|
|
|
${response1} BaseGetRequestOK ${result_url}/detail resultId=${resultId}&jobId=${reportId}
|
|
|
|
|
|
|
|
|
|
|
|
InsertFile datasetId ${datasetId}
|
|
|
|
|
|
InsertFile chartId ${chartId}
|
|
|
|
|
|
InsertFile reportId ${reportId}
|
|
|
|
|
|
InsertFile resultId ${resultId}
|
2020-06-18 18:20:43 +08:00
|
|
|
|
|
|
|
|
|
|
Report_Dashboard_Result-009
|
|
|
|
|
|
#新建DataSet,统计安全日志里的前一天的Monitor动作的会话数和字节数
|
|
|
|
|
|
${name} Set Variable Report_Dashboard_Result-009
|
2020-06-19 11:35:37 +08:00
|
|
|
|
BasePostRequestOK ${dataset_url} {"list":{"name":"${name}","logType":"security_event_log","filterConnector":"and","groupColumnList":[{"name":"common_recv_time"}],"queryColumnList":[{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_c2s_byte_num","expression":"sum","label":"Bytes Sent","expressionList":[{"label":"sum","value":"sum"},{"label":"min","value":"min"},{"label":"max","value":"max"},{"label":"avg","value":"avg"},{"label":"count","value":"count"}]},{"name":"common_s2c_byte_num","expression":"sum","label":"Bytes Received","expressionList":[{"label":"sum","value":"sum"},{"label":"min","value":"min"},{"label":"max","value":"max"},{"label":"avg","value":"avg"},{"label":"count","value":"count"}]},{"name":"common_recv_time","expression":"","label":"Receive Time"}],"filterConditionList":[{"name":"common_action","expression":"=","expressionList":["=","!=",">","<",">=","<="],"value":[1],"type":"int"}]}}
|
2020-06-18 18:20:43 +08:00
|
|
|
|
#根据name查询出该Dataset的id
|
2020-06-19 11:35:37 +08:00
|
|
|
|
${response} BaseGetRequestOK ${dataset_url} pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
2020-06-18 18:20:43 +08:00
|
|
|
|
${datasetId} Set Variable ${response}[data][list][0][id]
|
|
|
|
|
|
#根据DataSet的id,新建Chart,Lien图形表
|
2020-06-19 11:35:37 +08:00
|
|
|
|
BasePostRequestOK ${chart_url} {"list":{"id":null,"name":"${name}","description":"","datasetId":${datasetId},"chartType":"line","dataTop":0,"orderBy":"","orderDesc":1,"drilldownTop":0,"includeOther":false,"timeline":{"dataBinding":"Receive Time","label":"","format":"Time"},"line":[{"dataBinding":"Bytes Sent","type":"Line Up","format":"Default","legend":""},{"dataBinding":"Bytes Received","type":"Line Up","format":"Default","legend":""},{"dataBinding":"sessions","type":"Line Up","format":"Default","legend":""}]}}
|
2020-06-18 18:20:43 +08:00
|
|
|
|
#根据name查询出该Chart的id
|
2020-06-19 11:35:37 +08:00
|
|
|
|
${response1} BaseGetRequestOK ${chart_url} pageSize=20&pageNo=1&id=&name=${name}&opUser=
|
2020-06-18 18:20:43 +08:00
|
|
|
|
${chartId} Set Variable ${response1}[data][list][0][id]
|
|
|
|
|
|
#新建Report,时间计划为Today,图表引用Line。
|
2020-06-19 11:35:37 +08:00
|
|
|
|
BasePostRequestOK ${report_url} {"reportJobList":{"rangeType":"yesterday","rangeInterval":1,"jobName":"${name}","scheduleId":"","chartList":[{"chartId":${chartId},"timeGranulartiy":5,"timeUnit":"minute","disabled":false}],"isNotice":0,"noticeMethod":"","receiver":[],"startTime":"","endTime":"","filterConnector":"and","filterCondition":[]}}
|
2020-06-18 18:20:43 +08:00
|
|
|
|
#查询Report的id
|
2020-06-19 11:35:37 +08:00
|
|
|
|
${response1} BaseGetRequestOK ${report_url} pageSize=20&pageNo=1&jobIds=&jobName=${name}&opStartTime=&opEndTime=&opUser=&scheduleId=
|
2020-06-18 18:20:43 +08:00
|
|
|
|
${reportId} Set Variable ${response1}[data][list][0][jobId]
|
2020-06-22 19:33:59 +08:00
|
|
|
|
#通过report的id,生成report报表
|
|
|
|
|
|
#BasePostRequestOK ${report_url} {"jobId":${reportId}}
|
2020-06-18 18:20:43 +08:00
|
|
|
|
#查询Report结果的状态,并判断状态结果,如果状态是执行成功,查看report结果内容
|
|
|
|
|
|
FOR ${i} IN RANGE 50
|
|
|
|
|
|
sleep 10
|
|
|
|
|
|
#report执行状态查询
|
2020-06-19 11:35:37 +08:00
|
|
|
|
${response1} BaseGetRequestOK ${result_url} jobId=${reportId}
|
2020-06-18 18:20:43 +08:00
|
|
|
|
${status} Set Variable ${response1}[data][list][0][status]
|
|
|
|
|
|
${resultId} Set Variable ${response1}[data][list][0][resultId]
|
|
|
|
|
|
run keyword if "${status}"=="0" log non-execution
|
|
|
|
|
|
... ELSE IF "${status}"=="1" log executing
|
|
|
|
|
|
... ELSE IF "${status}"=="2" Exit For Loop
|
|
|
|
|
|
... ELSE log Exec failure
|
|
|
|
|
|
END
|
|
|
|
|
|
#Report报表详情查询
|
2020-06-22 19:33:59 +08:00
|
|
|
|
${response1} BaseGetRequestOK ${result_url}/detail resultId=${resultId}&jobId=${reportId}
|
|
|
|
|
|
|
|
|
|
|
|
InsertFile datasetId ${datasetId}
|
|
|
|
|
|
InsertFile chartId ${chartId}
|
|
|
|
|
|
InsertFile reportId ${reportId}
|
|
|
|
|
|
InsertFile resultId ${resultId}
|
2020-06-18 18:20:43 +08:00
|
|
|
|
|
|
|
|
|
|
Report_Dashboard_Result-010
|
|
|
|
|
|
#新建DataSet,统计安全日志里的前一天的Intercept动作的会话数和包数
|
|
|
|
|
|
${name} Set Variable Report_Dashboard_Result-010
|
2020-06-19 11:35:37 +08:00
|
|
|
|
BasePostRequestOK ${dataset_url} {"list":{"name":"${name}","logType":"security_event_log","filterConnector":"and","groupColumnList":[{"name":"common_recv_time"}],"queryColumnList":[{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_c2s_pkt_num","expression":"sum","label":"Packets Sent","expressionList":[{"label":"sum","value":"sum"},{"label":"min","value":"min"},{"label":"max","value":"max"},{"label":"avg","value":"avg"},{"label":"count","value":"count"}]},{"name":"common_s2c_pkt_num","expression":"sum","label":"Packets Received","expressionList":[{"label":"sum","value":"sum"},{"label":"min","value":"min"},{"label":"max","value":"max"},{"label":"avg","value":"avg"},{"label":"count","value":"count"}]},{"name":"common_recv_time","expression":"","label":"Receive Time"}],"filterConditionList":[{"name":"common_action","expression":"=","expressionList":["=","!=",">","<",">=","<="],"value":[2],"type":"int"}]}}
|
2020-06-18 18:20:43 +08:00
|
|
|
|
#根据name查询出该Dataset的id
|
2020-06-19 11:35:37 +08:00
|
|
|
|
${response} BaseGetRequestOK ${dataset_url} pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
2020-06-18 18:20:43 +08:00
|
|
|
|
${datasetId} Set Variable ${response}[data][list][0][id]
|
|
|
|
|
|
#根据DataSet的id,新建Chart,Lien图形表
|
2020-06-19 11:35:37 +08:00
|
|
|
|
BasePostRequestOK ${chart_url} {"list":{"id":null,"name":"${name}","description":"","datasetId":${datasetId},"chartType":"line","dataTop":0,"orderBy":"","orderDesc":1,"drilldownTop":0,"includeOther":false,"timeline":{"dataBinding":"Receive Time","label":"","format":"Time"},"line":[{"dataBinding":"Packets Received","type":"Line Up","format":"Default","legend":""},{"dataBinding":"Packets Sent","type":"Line Up","format":"Default","legend":""},{"dataBinding":"sessions","type":"Line Up","format":"Default","legend":""}]}}
|
2020-06-18 18:20:43 +08:00
|
|
|
|
#根据name查询出该Chart的id
|
2020-06-19 11:35:37 +08:00
|
|
|
|
${response1} BaseGetRequestOK ${chart_url} pageSize=20&pageNo=1&id=&name=${name}&opUser=
|
2020-06-18 18:20:43 +08:00
|
|
|
|
${chartId} Set Variable ${response1}[data][list][0][id]
|
|
|
|
|
|
#新建Report,时间计划为Today,图表引用Line。
|
2020-06-19 11:35:37 +08:00
|
|
|
|
BasePostRequestOK ${report_url} {"reportJobList":{"rangeType":"yesterday","rangeInterval":1,"jobName":"${name}","scheduleId":"","chartList":[{"chartId":${chartId},"timeGranulartiy":5,"timeUnit":"minute","disabled":false}],"isNotice":0,"noticeMethod":"","receiver":[],"startTime":"","endTime":"","filterConnector":"and","filterCondition":[]}}
|
2020-06-18 18:20:43 +08:00
|
|
|
|
#查询Report的id
|
2020-06-19 11:35:37 +08:00
|
|
|
|
${response1} BaseGetRequestOK ${report_url} pageSize=20&pageNo=1&jobIds=&jobName=${name}&opStartTime=&opEndTime=&opUser=&scheduleId=
|
2020-06-18 18:20:43 +08:00
|
|
|
|
${reportId} Set Variable ${response1}[data][list][0][jobId]
|
2020-06-22 19:33:59 +08:00
|
|
|
|
#通过report的id,生成report报表
|
|
|
|
|
|
#BasePostRequestOK ${report_url} {"jobId":${reportId}}
|
2020-06-18 18:20:43 +08:00
|
|
|
|
#查询Report结果的状态,并判断状态结果,如果状态是执行成功,查看report结果内容
|
|
|
|
|
|
FOR ${i} IN RANGE 50
|
|
|
|
|
|
sleep 10
|
|
|
|
|
|
#report执行状态查询
|
2020-06-19 11:35:37 +08:00
|
|
|
|
${response1} BaseGetRequestOK ${result_url} jobId=${reportId}
|
2020-06-18 18:20:43 +08:00
|
|
|
|
${status} Set Variable ${response1}[data][list][0][status]
|
|
|
|
|
|
${resultId} Set Variable ${response1}[data][list][0][resultId]
|
|
|
|
|
|
run keyword if "${status}"=="0" log non-execution
|
|
|
|
|
|
... ELSE IF "${status}"=="1" log executing
|
|
|
|
|
|
... ELSE IF "${status}"=="2" Exit For Loop
|
|
|
|
|
|
... ELSE log Exec failure
|
|
|
|
|
|
END
|
|
|
|
|
|
#Report报表详情查询
|
2020-06-22 19:33:59 +08:00
|
|
|
|
${response1} BaseGetRequestOK ${result_url}/detail resultId=${resultId}&jobId=${reportId}
|
|
|
|
|
|
|
|
|
|
|
|
InsertFile datasetId ${datasetId}
|
|
|
|
|
|
InsertFile chartId ${chartId}
|
|
|
|
|
|
InsertFile reportId ${reportId}
|
|
|
|
|
|
InsertFile resultId ${resultId}
|
2020-06-18 18:20:43 +08:00
|
|
|
|
|
|
|
|
|
|
Report_Dashboard_Result-011
|
|
|
|
|
|
#新建DataSet,统计安全日志里的前一天的Intercept动作的会话数和字节数
|
|
|
|
|
|
${name} Set Variable Report_Dashboard_Result-011
|
2020-06-19 11:35:37 +08:00
|
|
|
|
BasePostRequestOK ${dataset_url} {"list":{"name":"${name}","logType":"security_event_log","filterConnector":"and","groupColumnList":[{"name":"common_recv_time"}],"queryColumnList":[{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_c2s_byte_num","expression":"sum","label":"Bytes Sent","expressionList":[{"label":"sum","value":"sum"},{"label":"min","value":"min"},{"label":"max","value":"max"},{"label":"avg","value":"avg"},{"label":"count","value":"count"}]},{"name":"common_s2c_byte_num","expression":"sum","label":"Bytes Received","expressionList":[{"label":"sum","value":"sum"},{"label":"min","value":"min"},{"label":"max","value":"max"},{"label":"avg","value":"avg"},{"label":"count","value":"count"}]},{"name":"common_recv_time","expression":"","label":"Receive Time"}],"filterConditionList":[{"name":"common_action","expression":"=","expressionList":["=","!=",">","<",">=","<="],"value":[2],"type":"int"}]}}
|
2020-06-18 18:20:43 +08:00
|
|
|
|
#根据name查询出该Dataset的id
|
2020-06-19 11:35:37 +08:00
|
|
|
|
${response} BaseGetRequestOK ${dataset_url} pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
2020-06-18 18:20:43 +08:00
|
|
|
|
${datasetId} Set Variable ${response}[data][list][0][id]
|
|
|
|
|
|
#根据DataSet的id,新建Chart,Lien图形表
|
2020-06-19 11:35:37 +08:00
|
|
|
|
BasePostRequestOK ${chart_url} {"list":{"id":null,"name":"${name}","description":"","datasetId":${datasetId},"chartType":"line","dataTop":0,"orderBy":"","orderDesc":1,"drilldownTop":0,"includeOther":false,"timeline":{"dataBinding":"Receive Time","label":"","format":"Time"},"line":[{"dataBinding":"Bytes Sent","type":"Line Up","format":"Default","legend":""},{"dataBinding":"Bytes Received","type":"Line Up","format":"Default","legend":""},{"dataBinding":"sessions","type":"Line Up","format":"Default","legend":""}]}}
|
2020-06-18 18:20:43 +08:00
|
|
|
|
#根据name查询出该Chart的id
|
2020-06-19 11:35:37 +08:00
|
|
|
|
${response1} BaseGetRequestOK ${chart_url} pageSize=20&pageNo=1&id=&name=${name}&opUser=
|
2020-06-18 18:20:43 +08:00
|
|
|
|
${chartId} Set Variable ${response1}[data][list][0][id]
|
|
|
|
|
|
#新建Report,时间计划为Today,图表引用Line。
|
2020-06-19 11:35:37 +08:00
|
|
|
|
BasePostRequestOK ${report_url} {"reportJobList":{"rangeType":"yesterday","rangeInterval":1,"jobName":"${name}","scheduleId":"","chartList":[{"chartId":${chartId},"timeGranulartiy":5,"timeUnit":"minute","disabled":false}],"isNotice":0,"noticeMethod":"","receiver":[],"startTime":"","endTime":"","filterConnector":"and","filterCondition":[]}}
|
2020-06-18 18:20:43 +08:00
|
|
|
|
#查询Report的id
|
2020-06-19 11:35:37 +08:00
|
|
|
|
${response1} BaseGetRequestOK ${report_url} pageSize=20&pageNo=1&jobIds=&jobName=${name}&opStartTime=&opEndTime=&opUser=&scheduleId=
|
2020-06-18 18:20:43 +08:00
|
|
|
|
${reportId} Set Variable ${response1}[data][list][0][jobId]
|
2020-06-22 19:33:59 +08:00
|
|
|
|
#通过report的id,生成report报表
|
|
|
|
|
|
#BasePostRequestOK ${report_url} {"jobId":${reportId}}
|
|
|
|
|
|
#查询Report结果的状态,并判断状态结果,如果状态是执行成功,查看report结果内容
|
|
|
|
|
|
FOR ${i} IN RANGE 50
|
|
|
|
|
|
sleep 10
|
|
|
|
|
|
#report执行状态查询
|
|
|
|
|
|
${response1} BaseGetRequestOK ${result_url} jobId=${reportId}
|
|
|
|
|
|
${status} Set Variable ${response1}[data][list][0][status]
|
|
|
|
|
|
${resultId} Set Variable ${response1}[data][list][0][resultId]
|
|
|
|
|
|
run keyword if "${status}"=="0" log non-execution
|
|
|
|
|
|
... ELSE IF "${status}"=="1" log executing
|
|
|
|
|
|
... ELSE IF "${status}"=="2" Exit For Loop
|
|
|
|
|
|
... ELSE log Exec failure
|
|
|
|
|
|
END
|
|
|
|
|
|
#Report报表详情查询
|
|
|
|
|
|
${response1} BaseGetRequestOK ${result_url}/detail resultId=${resultId}&jobId=${reportId}
|
|
|
|
|
|
|
|
|
|
|
|
InsertFile datasetId ${datasetId}
|
|
|
|
|
|
InsertFile chartId ${chartId}
|
|
|
|
|
|
InsertFile reportId ${reportId}
|
|
|
|
|
|
InsertFile resultId ${resultId}
|
|
|
|
|
|
|
|
|
|
|
|
Report_Dashboard_Result-012
|
|
|
|
|
|
#新建DataSet,统计安全日志里的前一天命中安全策略前十的策略id,
|
|
|
|
|
|
${name} Set Variable Report_Dashboard_Result-012
|
|
|
|
|
|
BasePostRequestOK ${dataset_url} {"list":{"name":"${name}","logType":"security_event_log","filterConnector":"and","groupColumnList":[{"name":"common_policy_id"}],"queryColumnList":[{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_policy_id","expression":"","label":"Policy ID"}],"filterConditionList":[]}}
|
|
|
|
|
|
#根据name查询出该Dataset的id
|
|
|
|
|
|
${response} BaseGetRequestOK ${dataset_url} pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
|
|
|
|
|
${datasetId} Set Variable ${response}[data][list][0][id]
|
|
|
|
|
|
#根据DataSet的id,新建Chart,table图形表
|
|
|
|
|
|
BasePostRequestOK ${chart_url} {"list":{"id":null,"name":"${name}","description":"","datasetId":${datasetId},"chartType":"table","dataTop":10,"orderBy":"sessions","orderDesc":0,"drilldownTop":null,"includeOther":false,"tableType":"Regular","columns":[{"title":"Policy ID","width":50,"dataBindings":[{"dataType":"","dataBinding":"Policy ID","format":"Default","legend":"","name":"common_policy_id"}]},{"title":"sessions","width":50,"dataBindings":[{"dataType":"","dataBinding":"sessions","format":"Default","legend":"","name":"common_log_id"}]}]}}
|
|
|
|
|
|
#根据name查询出该Chart的id
|
|
|
|
|
|
${response1} BaseGetRequestOK ${chart_url} pageSize=20&pageNo=1&id=&name=${name}&opUser=
|
|
|
|
|
|
${chartId} Set Variable ${response1}[data][list][0][id]
|
|
|
|
|
|
#新建Report,时间计划为yesterday,图表引用table。
|
|
|
|
|
|
BasePostRequestOK ${report_url} {"reportJobList":{"rangeType":"yesterday","rangeInterval":1,"jobName":"${name}","scheduleId":"","chartList":[{"chartId":${chartId},"timeGranulartiy":1,"timeUnit":"","disabled":true}],"isNotice":0,"noticeMethod":"","receiver":"","startTime":"","endTime":"","filterConnector":"and","filterCondition":[]}}
|
|
|
|
|
|
#查询Report的id
|
|
|
|
|
|
${response1} BaseGetRequestOK ${report_url} pageSize=20&pageNo=1&jobIds=&jobName=${name}&opStartTime=&opEndTime=&opUser=&scheduleId=
|
|
|
|
|
|
${reportId} Set Variable ${response1}[data][list][0][jobId]
|
|
|
|
|
|
#通过report的id,生成report报表
|
|
|
|
|
|
#BasePostRequestOK ${report_url} {"jobId":${reportId}}
|
|
|
|
|
|
#查询Report结果的状态,并判断状态结果,如果状态是执行成功,查看report结果内容
|
|
|
|
|
|
FOR ${i} IN RANGE 50
|
|
|
|
|
|
sleep 10
|
|
|
|
|
|
#report执行状态查询
|
|
|
|
|
|
${response1} BaseGetRequestOK ${result_url} jobId=${reportId}
|
|
|
|
|
|
${status} Set Variable ${response1}[data][list][0][status]
|
|
|
|
|
|
${resultId} Set Variable ${response1}[data][list][0][resultId]
|
|
|
|
|
|
run keyword if "${status}"=="0" log non-execution
|
|
|
|
|
|
... ELSE IF "${status}"=="1" log executing
|
|
|
|
|
|
... ELSE IF "${status}"=="2" Exit For Loop
|
|
|
|
|
|
... ELSE log Exec failure
|
|
|
|
|
|
END
|
|
|
|
|
|
#Report报表详情查询
|
|
|
|
|
|
${response1} BaseGetRequestOK ${result_url}/detail resultId=${resultId}&jobId=${reportId}
|
|
|
|
|
|
|
|
|
|
|
|
InsertFile datasetId ${datasetId}
|
|
|
|
|
|
InsertFile chartId ${chartId}
|
|
|
|
|
|
InsertFile reportId ${reportId}
|
|
|
|
|
|
InsertFile resultId ${resultId}
|
|
|
|
|
|
|
|
|
|
|
|
Report_Dashboard_Result-013
|
|
|
|
|
|
#新建DataSet,统计通联日志里的前一天命中策略前十的Client IP,
|
|
|
|
|
|
${name} Set Variable Report_Dashboard_Result-013
|
|
|
|
|
|
BasePostRequestOK ${dataset_url} {"list":{"name":"${name}","logType":"connection_record_log","filterConnector":"and","groupColumnList":[{"name":"common_client_ip"}],"queryColumnList":[{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_client_ip","expression":"","label":"Client IP"}],"filterConditionList":[]}}
|
|
|
|
|
|
#根据name查询出该Dataset的id
|
|
|
|
|
|
${response} BaseGetRequestOK ${dataset_url} pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
|
|
|
|
|
${datasetId} Set Variable ${response}[data][list][0][id]
|
|
|
|
|
|
#根据DataSet的id,新建Chart,Bar图形表
|
|
|
|
|
|
BasePostRequestOK ${chart_url} {"list":{"id":null,"name":"${name}","description":"","datasetId":${datasetId},"chartType":"bar","dataTop":0,"orderBy":"","orderDesc":"","includeOther":false,"xAxis":{"dataBinding":"Client IP","label":"Client IP","dataTop":"10","dataType":""},"yAxis":[{"dataBinding":"sessions","format":"Default","legend":"sessions"}]}}
|
|
|
|
|
|
#根据name查询出该Chart的id
|
|
|
|
|
|
${response1} BaseGetRequestOK ${chart_url} pageSize=20&pageNo=1&id=&name=${name}&opUser=
|
|
|
|
|
|
${chartId} Set Variable ${response1}[data][list][0][id]
|
|
|
|
|
|
#新建Report,时间计划为yesterday,图表引用table。
|
|
|
|
|
|
BasePostRequestOK ${report_url} {"reportJobList":{"rangeType":"yesterday","rangeInterval":1,"jobName":"${name}","scheduleId":"","chartList":[{"chartId":${chartId},"timeGranulartiy":1,"timeUnit":"","disabled":true}],"isNotice":0,"noticeMethod":"","receiver":"","startTime":"","endTime":"","filterConnector":"and","filterCondition":[]}}
|
|
|
|
|
|
#查询Report的id
|
|
|
|
|
|
${response1} BaseGetRequestOK ${report_url} pageSize=20&pageNo=1&jobIds=&jobName=${name}&opStartTime=&opEndTime=&opUser=&scheduleId=
|
|
|
|
|
|
${reportId} Set Variable ${response1}[data][list][0][jobId]
|
|
|
|
|
|
#通过report的id,生成report报表
|
|
|
|
|
|
#BasePostRequestOK ${report_url} {"jobId":${reportId}}
|
|
|
|
|
|
#查询Report结果的状态,并判断状态结果,如果状态是执行成功,查看report结果内容
|
|
|
|
|
|
FOR ${i} IN RANGE 50
|
|
|
|
|
|
sleep 10
|
|
|
|
|
|
#report执行状态查询
|
|
|
|
|
|
${response1} BaseGetRequestOK ${result_url} jobId=${reportId}
|
|
|
|
|
|
${status} Set Variable ${response1}[data][list][0][status]
|
|
|
|
|
|
${resultId} Set Variable ${response1}[data][list][0][resultId]
|
|
|
|
|
|
run keyword if "${status}"=="0" log non-execution
|
|
|
|
|
|
... ELSE IF "${status}"=="1" log executing
|
|
|
|
|
|
... ELSE IF "${status}"=="2" Exit For Loop
|
|
|
|
|
|
... ELSE log Exec failure
|
|
|
|
|
|
END
|
|
|
|
|
|
#Report报表详情查询
|
|
|
|
|
|
${response1} BaseGetRequestOK ${result_url}/detail resultId=${resultId}&jobId=${reportId}
|
|
|
|
|
|
|
|
|
|
|
|
InsertFile datasetId ${datasetId}
|
|
|
|
|
|
InsertFile chartId ${chartId}
|
|
|
|
|
|
InsertFile reportId ${reportId}
|
|
|
|
|
|
InsertFile resultId ${resultId}
|
|
|
|
|
|
|
|
|
|
|
|
Report_Dashboard_Result-014
|
|
|
|
|
|
#新建DataSet,统计通联日志里的前一天命中策略前十的Server IP,
|
|
|
|
|
|
${name} Set Variable Report_Dashboard_Result-014
|
|
|
|
|
|
BasePostRequestOK ${dataset_url} {"list":{"name":"${name}","logType":"connection_record_log","filterConnector":"and","groupColumnList":[{"name":"common_server_ip"}],"queryColumnList":[{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_server_ip","expression":"","label":"Server IP"}],"filterConditionList":[]}}
|
|
|
|
|
|
#根据name查询出该Dataset的id
|
|
|
|
|
|
${response} BaseGetRequestOK ${dataset_url} pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
|
|
|
|
|
${datasetId} Set Variable ${response}[data][list][0][id]
|
|
|
|
|
|
#根据DataSet的id,新建Chart,Pie图形表
|
|
|
|
|
|
BasePostRequestOK ${chart_url} {"list":{"id":null,"name":"${name}","description":"","datasetId":${datasetId},"chartType":"pie","dataTop":0,"orderBy":"","orderDesc":"","includeOther":false,"xAxis":{"dataBinding":"Server IP","label":"Server IP","dataTop":"10","dataType":""},"yAxis":[{"dataBinding":"sessions","format":"Default","legend":"sessions"}]}}
|
|
|
|
|
|
#根据name查询出该Chart的id
|
|
|
|
|
|
${response1} BaseGetRequestOK ${chart_url} pageSize=20&pageNo=1&id=&name=${name}&opUser=
|
|
|
|
|
|
${chartId} Set Variable ${response1}[data][list][0][id]
|
|
|
|
|
|
#新建Report,时间计划为yesterday,图表引用table。
|
|
|
|
|
|
BasePostRequestOK ${report_url} {"reportJobList":{"rangeType":"yesterday","rangeInterval":1,"jobName":"${name}","scheduleId":"","chartList":[{"chartId":${chartId},"timeGranulartiy":1,"timeUnit":"","disabled":true}],"isNotice":0,"noticeMethod":"","receiver":"","startTime":"","endTime":"","filterConnector":"and","filterCondition":[]}}
|
|
|
|
|
|
#查询Report的id
|
|
|
|
|
|
${response1} BaseGetRequestOK ${report_url} pageSize=20&pageNo=1&jobIds=&jobName=${name}&opStartTime=&opEndTime=&opUser=&scheduleId=
|
|
|
|
|
|
${reportId} Set Variable ${response1}[data][list][0][jobId]
|
|
|
|
|
|
#通过report的id,生成report报表
|
|
|
|
|
|
#BasePostRequestOK ${report_url} {"jobId":${reportId}}
|
|
|
|
|
|
#查询Report结果的状态,并判断状态结果,如果状态是执行成功,查看report结果内容
|
|
|
|
|
|
FOR ${i} IN RANGE 50
|
|
|
|
|
|
sleep 10
|
|
|
|
|
|
#report执行状态查询
|
|
|
|
|
|
${response1} BaseGetRequestOK ${result_url} jobId=${reportId}
|
|
|
|
|
|
${status} Set Variable ${response1}[data][list][0][status]
|
|
|
|
|
|
${resultId} Set Variable ${response1}[data][list][0][resultId]
|
|
|
|
|
|
run keyword if "${status}"=="0" log non-execution
|
|
|
|
|
|
... ELSE IF "${status}"=="1" log executing
|
|
|
|
|
|
... ELSE IF "${status}"=="2" Exit For Loop
|
|
|
|
|
|
... ELSE log Exec failure
|
|
|
|
|
|
END
|
|
|
|
|
|
#Report报表详情查询
|
|
|
|
|
|
${response1} BaseGetRequestOK ${result_url}/detail resultId=${resultId}&jobId=${reportId}
|
|
|
|
|
|
|
|
|
|
|
|
InsertFile datasetId ${datasetId}
|
|
|
|
|
|
InsertFile chartId ${chartId}
|
|
|
|
|
|
InsertFile reportId ${reportId}
|
|
|
|
|
|
InsertFile resultId ${resultId}
|
|
|
|
|
|
|
|
|
|
|
|
Report_Dashboard_Result-015
|
|
|
|
|
|
#新建DataSet,统计通联日志里的前一天命中策略前十的Sub-id,
|
|
|
|
|
|
${name} Set Variable Report_Dashboard_Result-015
|
|
|
|
|
|
BasePostRequestOK ${dataset_url} {"list":{"name":"${name}","logType":"connection_record_log","filterConnector":"and","groupColumnList":[{"name":"common_subscriber_id"}],"queryColumnList":[{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_subscriber_id","expression":"","label":"Subscriber ID"}],"filterConditionList":[]}}
|
|
|
|
|
|
#根据name查询出该Dataset的id
|
|
|
|
|
|
${response} BaseGetRequestOK ${dataset_url} pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
|
|
|
|
|
${datasetId} Set Variable ${response}[data][list][0][id]
|
|
|
|
|
|
#根据DataSet的id,新建Chart,Table图形表
|
|
|
|
|
|
BasePostRequestOK ${chart_url} {"list":{"id":null,"name":"${name}","description":"","datasetId":${datasetId},"chartType":"table","dataTop":10,"orderBy":"sessions","orderDesc":0,"drilldownTop":null,"includeOther":false,"tableType":"Regular","columns":[{"title":"Subscriber ID","width":50,"dataBindings":[{"dataType":"","dataBinding":"Subscriber ID","format":"Default","legend":"","name":"common_subscriber_id"}]},{"title":"sessions","width":50,"dataBindings":[{"dataType":"","dataBinding":"sessions","format":"Default","legend":"","name":"common_log_id"}]}]}}
|
|
|
|
|
|
#根据name查询出该Chart的id
|
|
|
|
|
|
${response1} BaseGetRequestOK ${chart_url} pageSize=20&pageNo=1&id=&name=${name}&opUser=
|
|
|
|
|
|
${chartId} Set Variable ${response1}[data][list][0][id]
|
|
|
|
|
|
#新建Report,时间计划为yesterday,图表引用table。
|
|
|
|
|
|
BasePostRequestOK ${report_url} {"reportJobList":{"rangeType":"yesterday","rangeInterval":1,"jobName":"${name}","scheduleId":"","chartList":[{"chartId":${chartId},"timeGranulartiy":1,"timeUnit":"","disabled":true}],"isNotice":0,"noticeMethod":"","receiver":"","startTime":"","endTime":"","filterConnector":"and","filterCondition":[]}}
|
|
|
|
|
|
#查询Report的id
|
|
|
|
|
|
${response1} BaseGetRequestOK ${report_url} pageSize=20&pageNo=1&jobIds=&jobName=${name}&opStartTime=&opEndTime=&opUser=&scheduleId=
|
|
|
|
|
|
${reportId} Set Variable ${response1}[data][list][0][jobId]
|
|
|
|
|
|
#通过report的id,生成report报表
|
|
|
|
|
|
#BasePostRequestOK ${report_url} {"jobId":${reportId}}
|
|
|
|
|
|
#查询Report结果的状态,并判断状态结果,如果状态是执行成功,查看report结果内容
|
|
|
|
|
|
FOR ${i} IN RANGE 50
|
|
|
|
|
|
sleep 10
|
|
|
|
|
|
#report执行状态查询
|
|
|
|
|
|
${response1} BaseGetRequestOK ${result_url} jobId=${reportId}
|
|
|
|
|
|
${status} Set Variable ${response1}[data][list][0][status]
|
|
|
|
|
|
${resultId} Set Variable ${response1}[data][list][0][resultId]
|
|
|
|
|
|
run keyword if "${status}"=="0" log non-execution
|
|
|
|
|
|
... ELSE IF "${status}"=="1" log executing
|
|
|
|
|
|
... ELSE IF "${status}"=="2" Exit For Loop
|
|
|
|
|
|
... ELSE log Exec failure
|
|
|
|
|
|
END
|
|
|
|
|
|
#Report报表详情查询
|
|
|
|
|
|
${response1} BaseGetRequestOK ${result_url}/detail resultId=${resultId}&jobId=${reportId}
|
|
|
|
|
|
|
|
|
|
|
|
InsertFile datasetId ${datasetId}
|
|
|
|
|
|
InsertFile chartId ${chartId}
|
|
|
|
|
|
InsertFile reportId ${reportId}
|
|
|
|
|
|
InsertFile resultId ${resultId}
|
|
|
|
|
|
|
|
|
|
|
|
Report_Dashboard_Result-016
|
|
|
|
|
|
#新建DataSet,统计通联日志里的前一天命中策略前十的Domains
|
|
|
|
|
|
${name} Set Variable Report_Dashboard_Result-016
|
|
|
|
|
|
BasePostRequestOK ${dataset_url} {"list":{"name":"${naem}","logType":"connection_record_log","filterConnector":"and","groupColumnList":[{"name":"http_domain"}],"queryColumnList":[{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"http_domain","expression":"","label":"Http.Domain"}],"filterConditionList":[]}}
|
|
|
|
|
|
#根据name查询出该Dataset的id
|
|
|
|
|
|
${response} BaseGetRequestOK ${dataset_url} pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
|
|
|
|
|
${datasetId} Set Variable ${response}[data][list][0][id]
|
|
|
|
|
|
#根据DataSet的id,新建Chart,Bar图形表
|
|
|
|
|
|
BasePostRequestOK ${chart_url} {"list":{"id":null,"name":"${name}","description":"","datasetId":${datasetId},"chartType":"bar","dataTop":0,"orderBy":"","orderDesc":"","includeOther":false,"xAxis":{"dataBinding":"Http.Domain","label":"Http.Domain","dataTop":"10","dataType":""},"yAxis":[{"dataBinding":"sessions","format":"Default","legend":"sessions"}]}}
|
|
|
|
|
|
#根据name查询出该Chart的id
|
|
|
|
|
|
${response1} BaseGetRequestOK ${chart_url} pageSize=20&pageNo=1&id=&name=${name}&opUser=
|
|
|
|
|
|
${chartId} Set Variable ${response1}[data][list][0][id]
|
|
|
|
|
|
#新建Report,时间计划为yesterday,图表引用table。
|
|
|
|
|
|
BasePostRequestOK ${report_url} {"reportJobList":{"rangeType":"yesterday","rangeInterval":1,"jobName":"${name}","scheduleId":"","chartList":[{"chartId":${chartId},"timeGranulartiy":1,"timeUnit":"","disabled":true}],"isNotice":0,"noticeMethod":"","receiver":"","startTime":"","endTime":"","filterConnector":"and","filterCondition":[]}}
|
|
|
|
|
|
#查询Report的id
|
|
|
|
|
|
${response1} BaseGetRequestOK ${report_url} pageSize=20&pageNo=1&jobIds=&jobName=${name}&opStartTime=&opEndTime=&opUser=&scheduleId=
|
|
|
|
|
|
${reportId} Set Variable ${response1}[data][list][0][jobId]
|
|
|
|
|
|
#通过report的id,生成report报表
|
|
|
|
|
|
#BasePostRequestOK ${report_url} {"jobId":${reportId}}
|
|
|
|
|
|
#查询Report结果的状态,并判断状态结果,如果状态是执行成功,查看report结果内容
|
|
|
|
|
|
FOR ${i} IN RANGE 50
|
|
|
|
|
|
sleep 10
|
|
|
|
|
|
#report执行状态查询
|
|
|
|
|
|
${response1} BaseGetRequestOK ${result_url} jobId=${reportId}
|
|
|
|
|
|
${status} Set Variable ${response1}[data][list][0][status]
|
|
|
|
|
|
${resultId} Set Variable ${response1}[data][list][0][resultId]
|
|
|
|
|
|
run keyword if "${status}"=="0" log non-execution
|
|
|
|
|
|
... ELSE IF "${status}"=="1" log executing
|
|
|
|
|
|
... ELSE IF "${status}"=="2" Exit For Loop
|
|
|
|
|
|
... ELSE log Exec failure
|
|
|
|
|
|
END
|
|
|
|
|
|
#Report报表详情查询
|
|
|
|
|
|
${response1} BaseGetRequestOK ${result_url}/detail resultId=${resultId}&jobId=${reportId}
|
|
|
|
|
|
|
|
|
|
|
|
InsertFile datasetId ${datasetId}
|
|
|
|
|
|
InsertFile chartId ${chartId}
|
|
|
|
|
|
InsertFile reportId ${reportId}
|
|
|
|
|
|
InsertFile resultId ${resultId}
|
|
|
|
|
|
|
|
|
|
|
|
Report_Dashboard_Result-017
|
|
|
|
|
|
#新建DataSet,统计管控日志里的前一天的Allow动作的会话数
|
|
|
|
|
|
${name} Set Variable Report_Dashboard_Result-017
|
|
|
|
|
|
BasePostRequestOK ${dataset_url} {"list":{"name":"${name}","logType":"proxy_event_log","filterConnector":"and","groupColumnList":[{"name":"common_sub_action"}],"queryColumnList":[{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_sub_action","expression":"","label":"Sub Action"}],"filterConditionList":[{"name":"common_sub_action","expression":"=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["allow"],"type":"string"}]}}
|
|
|
|
|
|
#根据name查询出该Dataset的id
|
|
|
|
|
|
${response} BaseGetRequestOK ${dataset_url} pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
|
|
|
|
|
${datasetId} Set Variable ${response}[data][list][0][id]
|
|
|
|
|
|
#根据DataSet的id,新建Chart,Table图形表
|
|
|
|
|
|
BasePostRequestOK ${chart_url} {"list":{"id":null,"name":"${name}","description":"","datasetId":${datasetId},"chartType":"table","dataTop":1,"orderBy":"","orderDesc":"","drilldownTop":null,"includeOther":false,"tableType":"Regular","columns":[{"title":"Sub Action","width":50,"dataBindings":[{"dataType":"","dataBinding":"Sub Action","format":"Default","legend":"","name":"common_sub_action"}]},{"title":"sessions","width":50,"dataBindings":[{"dataType":"","dataBinding":"sessions","format":"Default","legend":"","name":"common_log_id"}]}]}}
|
|
|
|
|
|
#根据name查询出该Chart的id
|
|
|
|
|
|
${response1} BaseGetRequestOK ${chart_url} pageSize=20&pageNo=1&id=&name=${name}&opUser=
|
|
|
|
|
|
${chartId} Set Variable ${response1}[data][list][0][id]
|
|
|
|
|
|
#新建Report,时间计划为yesterday,图表引用table。
|
|
|
|
|
|
BasePostRequestOK ${report_url} {"reportJobList":{"rangeType":"yesterday","rangeInterval":1,"jobName":"${name}","scheduleId":"","chartList":[{"chartId":${chartId},"timeGranulartiy":1,"timeUnit":"","disabled":true}],"isNotice":0,"noticeMethod":"","receiver":"","startTime":"","endTime":"","filterConnector":"and","filterCondition":[]}}
|
|
|
|
|
|
#查询Report的id
|
|
|
|
|
|
${response1} BaseGetRequestOK ${report_url} pageSize=20&pageNo=1&jobIds=&jobName=${name}&opStartTime=&opEndTime=&opUser=&scheduleId=
|
|
|
|
|
|
${reportId} Set Variable ${response1}[data][list][0][jobId]
|
|
|
|
|
|
#通过report的id,生成report报表
|
|
|
|
|
|
#BasePostRequestOK ${report_url} {"jobId":${reportId}}
|
|
|
|
|
|
#查询Report结果的状态,并判断状态结果,如果状态是执行成功,查看report结果内容
|
|
|
|
|
|
FOR ${i} IN RANGE 50
|
|
|
|
|
|
sleep 10
|
|
|
|
|
|
#report执行状态查询
|
|
|
|
|
|
${response1} BaseGetRequestOK ${result_url} jobId=${reportId}
|
|
|
|
|
|
${status} Set Variable ${response1}[data][list][0][status]
|
|
|
|
|
|
${resultId} Set Variable ${response1}[data][list][0][resultId]
|
|
|
|
|
|
run keyword if "${status}"=="0" log non-execution
|
|
|
|
|
|
... ELSE IF "${status}"=="1" log executing
|
|
|
|
|
|
... ELSE IF "${status}"=="2" Exit For Loop
|
|
|
|
|
|
... ELSE log Exec failure
|
|
|
|
|
|
END
|
|
|
|
|
|
#Report报表详情查询
|
|
|
|
|
|
${response1} BaseGetRequestOK ${result_url}/detail resultId=${resultId}&jobId=${reportId}
|
|
|
|
|
|
|
|
|
|
|
|
InsertFile datasetId ${datasetId}
|
|
|
|
|
|
InsertFile chartId ${chartId}
|
|
|
|
|
|
InsertFile reportId ${reportId}
|
|
|
|
|
|
InsertFile resultId ${resultId}
|
|
|
|
|
|
|
|
|
|
|
|
Report_Dashboard_Result-018
|
|
|
|
|
|
#新建DataSet,统计管控日志里的前一天的Deny动作的会话数
|
|
|
|
|
|
${name} Set Variable Report_Dashboard_Result-018
|
|
|
|
|
|
BasePostRequestOK ${dataset_url} {"list":{"name":"${name}","logType":"proxy_event_log","filterConnector":"and","groupColumnList":[{"name":"common_sub_action"}],"queryColumnList":[{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_sub_action","expression":"","label":"Sub Action"}],"filterConditionList":[{"name":"common_sub_action","expression":"=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["deny"],"type":"string"}]}}
|
|
|
|
|
|
#根据name查询出该Dataset的id
|
|
|
|
|
|
${response} BaseGetRequestOK ${dataset_url} pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
|
|
|
|
|
${datasetId} Set Variable ${response}[data][list][0][id]
|
|
|
|
|
|
#根据DataSet的id,新建Chart,Table图形表
|
|
|
|
|
|
BasePostRequestOK ${chart_url} {"list":{"id":null,"name":"${name}","description":"","datasetId":${datasetId},"chartType":"table","dataTop":1,"orderBy":"","orderDesc":"","drilldownTop":null,"includeOther":false,"tableType":"Regular","columns":[{"title":"Sub Action","width":50,"dataBindings":[{"dataType":"","dataBinding":"Sub Action","format":"Default","legend":"","name":"common_sub_action"}]},{"title":"sessions","width":50,"dataBindings":[{"dataType":"","dataBinding":"sessions","format":"Default","legend":"","name":"common_log_id"}]}]}}
|
|
|
|
|
|
#根据name查询出该Chart的id
|
|
|
|
|
|
${response1} BaseGetRequestOK ${chart_url} pageSize=20&pageNo=1&id=&name=${name}&opUser=
|
|
|
|
|
|
${chartId} Set Variable ${response1}[data][list][0][id]
|
|
|
|
|
|
#新建Report,时间计划为yesterday,图表引用table。
|
|
|
|
|
|
BasePostRequestOK ${report_url} {"reportJobList":{"rangeType":"yesterday","rangeInterval":1,"jobName":"${name}","scheduleId":"","chartList":[{"chartId":${chartId},"timeGranulartiy":1,"timeUnit":"","disabled":true}],"isNotice":0,"noticeMethod":"","receiver":"","startTime":"","endTime":"","filterConnector":"and","filterCondition":[]}}
|
|
|
|
|
|
#查询Report的id
|
|
|
|
|
|
${response1} BaseGetRequestOK ${report_url} pageSize=20&pageNo=1&jobIds=&jobName=${name}&opStartTime=&opEndTime=&opUser=&scheduleId=
|
|
|
|
|
|
${reportId} Set Variable ${response1}[data][list][0][jobId]
|
|
|
|
|
|
#通过report的id,生成report报表
|
|
|
|
|
|
#BasePostRequestOK ${report_url} {"jobId":${reportId}}
|
|
|
|
|
|
#查询Report结果的状态,并判断状态结果,如果状态是执行成功,查看report结果内容
|
|
|
|
|
|
FOR ${i} IN RANGE 50
|
|
|
|
|
|
sleep 10
|
|
|
|
|
|
#report执行状态查询
|
|
|
|
|
|
${response1} BaseGetRequestOK ${result_url} jobId=${reportId}
|
|
|
|
|
|
${status} Set Variable ${response1}[data][list][0][status]
|
|
|
|
|
|
${resultId} Set Variable ${response1}[data][list][0][resultId]
|
|
|
|
|
|
run keyword if "${status}"=="0" log non-execution
|
|
|
|
|
|
... ELSE IF "${status}"=="1" log executing
|
|
|
|
|
|
... ELSE IF "${status}"=="2" Exit For Loop
|
|
|
|
|
|
... ELSE log Exec failure
|
|
|
|
|
|
END
|
|
|
|
|
|
#Report报表详情查询
|
|
|
|
|
|
${response1} BaseGetRequestOK ${result_url}/detail resultId=${resultId}&jobId=${reportId}
|
|
|
|
|
|
|
|
|
|
|
|
InsertFile datasetId ${datasetId}
|
|
|
|
|
|
InsertFile chartId ${chartId}
|
|
|
|
|
|
InsertFile reportId ${reportId}
|
|
|
|
|
|
InsertFile resultId ${resultId}
|
|
|
|
|
|
|
|
|
|
|
|
Report_Dashboard_Result-019
|
|
|
|
|
|
#新建DataSet,统计管控日志里的前一天的Monitor动作的会话数
|
|
|
|
|
|
${name} Set Variable Report_Dashboard_Result-019
|
|
|
|
|
|
BasePostRequestOK ${dataset_url} {"list":{"name":"${name}","logType":"proxy_event_log","filterConnector":"and","groupColumnList":[{"name":"common_sub_action"}],"queryColumnList":[{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_sub_action","expression":"","label":"Sub Action"}],"filterConditionList":[{"name":"common_sub_action","expression":"=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["monitor"],"type":"string"}]}}
|
|
|
|
|
|
#根据name查询出该Dataset的id
|
|
|
|
|
|
${response} BaseGetRequestOK ${dataset_url} pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
|
|
|
|
|
${datasetId} Set Variable ${response}[data][list][0][id]
|
|
|
|
|
|
#根据DataSet的id,新建Chart,Table图形表
|
|
|
|
|
|
BasePostRequestOK ${chart_url} {"list":{"id":null,"name":"${name}","description":"","datasetId":${datasetId},"chartType":"table","dataTop":1,"orderBy":"","orderDesc":"","drilldownTop":null,"includeOther":false,"tableType":"Regular","columns":[{"title":"Sub Action","width":50,"dataBindings":[{"dataType":"","dataBinding":"Sub Action","format":"Default","legend":"","name":"common_sub_action"}]},{"title":"sessions","width":50,"dataBindings":[{"dataType":"","dataBinding":"sessions","format":"Default","legend":"","name":"common_log_id"}]}]}}
|
|
|
|
|
|
#根据name查询出该Chart的id
|
|
|
|
|
|
${response1} BaseGetRequestOK ${chart_url} pageSize=20&pageNo=1&id=&name=${name}&opUser=
|
|
|
|
|
|
${chartId} Set Variable ${response1}[data][list][0][id]
|
|
|
|
|
|
#新建Report,时间计划为yesterday,图表引用table。
|
|
|
|
|
|
BasePostRequestOK ${report_url} {"reportJobList":{"rangeType":"yesterday","rangeInterval":1,"jobName":"${name}","scheduleId":"","chartList":[{"chartId":${chartId},"timeGranulartiy":1,"timeUnit":"","disabled":true}],"isNotice":0,"noticeMethod":"","receiver":"","startTime":"","endTime":"","filterConnector":"and","filterCondition":[]}}
|
|
|
|
|
|
#查询Report的id
|
|
|
|
|
|
${response1} BaseGetRequestOK ${report_url} pageSize=20&pageNo=1&jobIds=&jobName=${name}&opStartTime=&opEndTime=&opUser=&scheduleId=
|
|
|
|
|
|
${reportId} Set Variable ${response1}[data][list][0][jobId]
|
|
|
|
|
|
#通过report的id,生成report报表
|
|
|
|
|
|
#BasePostRequestOK ${report_url} {"jobId":${reportId}}
|
|
|
|
|
|
#查询Report结果的状态,并判断状态结果,如果状态是执行成功,查看report结果内容
|
|
|
|
|
|
FOR ${i} IN RANGE 50
|
|
|
|
|
|
sleep 10
|
|
|
|
|
|
#report执行状态查询
|
|
|
|
|
|
${response1} BaseGetRequestOK ${result_url} jobId=${reportId}
|
|
|
|
|
|
${status} Set Variable ${response1}[data][list][0][status]
|
|
|
|
|
|
${resultId} Set Variable ${response1}[data][list][0][resultId]
|
|
|
|
|
|
run keyword if "${status}"=="0" log non-execution
|
|
|
|
|
|
... ELSE IF "${status}"=="1" log executing
|
|
|
|
|
|
... ELSE IF "${status}"=="2" Exit For Loop
|
|
|
|
|
|
... ELSE log Exec failure
|
|
|
|
|
|
END
|
|
|
|
|
|
#Report报表详情查询
|
|
|
|
|
|
${response1} BaseGetRequestOK ${result_url}/detail resultId=${resultId}&jobId=${reportId}
|
|
|
|
|
|
|
|
|
|
|
|
InsertFile datasetId ${datasetId}
|
|
|
|
|
|
InsertFile chartId ${chartId}
|
|
|
|
|
|
InsertFile reportId ${reportId}
|
|
|
|
|
|
InsertFile resultId ${resultId}
|
|
|
|
|
|
|
|
|
|
|
|
Report_Dashboard_Result-020
|
|
|
|
|
|
#新建DataSet,统计管控日志里的前一天的replace动作的会话数
|
|
|
|
|
|
${name} Set Variable Report_Dashboard_Result-020
|
|
|
|
|
|
BasePostRequestOK ${dataset_url} {"list":{"name":"${name}","logType":"proxy_event_log","filterConnector":"and","groupColumnList":[{"name":"common_sub_action"}],"queryColumnList":[{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_sub_action","expression":"","label":"Sub Action"}],"filterConditionList":[{"name":"common_sub_action","expression":"=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["replace"],"type":"string"}]}}
|
|
|
|
|
|
#根据name查询出该Dataset的id
|
|
|
|
|
|
${response} BaseGetRequestOK ${dataset_url} pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
|
|
|
|
|
${datasetId} Set Variable ${response}[data][list][0][id]
|
|
|
|
|
|
#根据DataSet的id,新建Chart,Table图形表
|
|
|
|
|
|
BasePostRequestOK ${chart_url} {"list":{"id":null,"name":"${name}","description":"","datasetId":${datasetId},"chartType":"table","dataTop":1,"orderBy":"","orderDesc":"","drilldownTop":null,"includeOther":false,"tableType":"Regular","columns":[{"title":"Sub Action","width":50,"dataBindings":[{"dataType":"","dataBinding":"Sub Action","format":"Default","legend":"","name":"common_sub_action"}]},{"title":"sessions","width":50,"dataBindings":[{"dataType":"","dataBinding":"sessions","format":"Default","legend":"","name":"common_log_id"}]}]}}
|
|
|
|
|
|
#根据name查询出该Chart的id
|
|
|
|
|
|
${response1} BaseGetRequestOK ${chart_url} pageSize=20&pageNo=1&id=&name=${name}&opUser=
|
|
|
|
|
|
${chartId} Set Variable ${response1}[data][list][0][id]
|
|
|
|
|
|
#新建Report,时间计划为yesterday,图表引用table。
|
|
|
|
|
|
BasePostRequestOK ${report_url} {"reportJobList":{"rangeType":"yesterday","rangeInterval":1,"jobName":"${name}","scheduleId":"","chartList":[{"chartId":${chartId},"timeGranulartiy":1,"timeUnit":"","disabled":true}],"isNotice":0,"noticeMethod":"","receiver":"","startTime":"","endTime":"","filterConnector":"and","filterCondition":[]}}
|
|
|
|
|
|
#查询Report的id
|
|
|
|
|
|
${response1} BaseGetRequestOK ${report_url} pageSize=20&pageNo=1&jobIds=&jobName=${name}&opStartTime=&opEndTime=&opUser=&scheduleId=
|
|
|
|
|
|
${reportId} Set Variable ${response1}[data][list][0][jobId]
|
|
|
|
|
|
#通过report的id,生成report报表
|
|
|
|
|
|
#BasePostRequestOK ${report_url} {"jobId":${reportId}}
|
|
|
|
|
|
#查询Report结果的状态,并判断状态结果,如果状态是执行成功,查看report结果内容
|
|
|
|
|
|
FOR ${i} IN RANGE 50
|
|
|
|
|
|
sleep 10
|
|
|
|
|
|
#report执行状态查询
|
|
|
|
|
|
${response1} BaseGetRequestOK ${result_url} jobId=${reportId}
|
|
|
|
|
|
${status} Set Variable ${response1}[data][list][0][status]
|
|
|
|
|
|
${resultId} Set Variable ${response1}[data][list][0][resultId]
|
|
|
|
|
|
run keyword if "${status}"=="0" log non-execution
|
|
|
|
|
|
... ELSE IF "${status}"=="1" log executing
|
|
|
|
|
|
... ELSE IF "${status}"=="2" Exit For Loop
|
|
|
|
|
|
... ELSE log Exec failure
|
|
|
|
|
|
END
|
|
|
|
|
|
#Report报表详情查询
|
|
|
|
|
|
${response1} BaseGetRequestOK ${result_url}/detail resultId=${resultId}&jobId=${reportId}
|
|
|
|
|
|
|
|
|
|
|
|
InsertFile datasetId ${datasetId}
|
|
|
|
|
|
InsertFile chartId ${chartId}
|
|
|
|
|
|
InsertFile reportId ${reportId}
|
|
|
|
|
|
InsertFile resultId ${resultId}
|
|
|
|
|
|
|
|
|
|
|
|
Report_Dashboard_Result-021
|
|
|
|
|
|
#新建DataSet,统计管控日志里的前一天的redirect动作的会话数
|
|
|
|
|
|
${name} Set Variable Report_Dashboard_Result-021
|
|
|
|
|
|
BasePostRequestOK ${dataset_url} {"list":{"name":"${name}","logType":"proxy_event_log","filterConnector":"and","groupColumnList":[{"name":"common_sub_action"}],"queryColumnList":[{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_sub_action","expression":"","label":"Sub Action"}],"filterConditionList":[{"name":"common_sub_action","expression":"=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["redirect"],"type":"string"}]}}
|
|
|
|
|
|
#根据name查询出该Dataset的id
|
|
|
|
|
|
${response} BaseGetRequestOK ${dataset_url} pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
|
|
|
|
|
${datasetId} Set Variable ${response}[data][list][0][id]
|
|
|
|
|
|
#根据DataSet的id,新建Chart,Table图形表
|
|
|
|
|
|
BasePostRequestOK ${chart_url} {"list":{"id":null,"name":"${name}","description":"","datasetId":${datasetId},"chartType":"table","dataTop":1,"orderBy":"","orderDesc":"","drilldownTop":null,"includeOther":false,"tableType":"Regular","columns":[{"title":"Sub Action","width":50,"dataBindings":[{"dataType":"","dataBinding":"Sub Action","format":"Default","legend":"","name":"common_sub_action"}]},{"title":"sessions","width":50,"dataBindings":[{"dataType":"","dataBinding":"sessions","format":"Default","legend":"","name":"common_log_id"}]}]}}
|
|
|
|
|
|
#根据name查询出该Chart的id
|
|
|
|
|
|
${response1} BaseGetRequestOK ${chart_url} pageSize=20&pageNo=1&id=&name=${name}&opUser=
|
|
|
|
|
|
${chartId} Set Variable ${response1}[data][list][0][id]
|
|
|
|
|
|
#新建Report,时间计划为yesterday,图表引用table。
|
|
|
|
|
|
BasePostRequestOK ${report_url} {"reportJobList":{"rangeType":"yesterday","rangeInterval":1,"jobName":"${name}","scheduleId":"","chartList":[{"chartId":${chartId},"timeGranulartiy":1,"timeUnit":"","disabled":true}],"isNotice":0,"noticeMethod":"","receiver":"","startTime":"","endTime":"","filterConnector":"and","filterCondition":[]}}
|
|
|
|
|
|
#查询Report的id
|
|
|
|
|
|
${response1} BaseGetRequestOK ${report_url} pageSize=20&pageNo=1&jobIds=&jobName=${name}&opStartTime=&opEndTime=&opUser=&scheduleId=
|
|
|
|
|
|
${reportId} Set Variable ${response1}[data][list][0][jobId]
|
|
|
|
|
|
#通过report的id,生成report报表
|
|
|
|
|
|
#BasePostRequestOK ${report_url} {"jobId":${reportId}}
|
2020-06-18 18:20:43 +08:00
|
|
|
|
#查询Report结果的状态,并判断状态结果,如果状态是执行成功,查看report结果内容
|
|
|
|
|
|
FOR ${i} IN RANGE 50
|
|
|
|
|
|
sleep 10
|
|
|
|
|
|
#report执行状态查询
|
2020-06-19 11:35:37 +08:00
|
|
|
|
${response1} BaseGetRequestOK ${result_url} jobId=${reportId}
|
2020-06-18 18:20:43 +08:00
|
|
|
|
${status} Set Variable ${response1}[data][list][0][status]
|
|
|
|
|
|
${resultId} Set Variable ${response1}[data][list][0][resultId]
|
|
|
|
|
|
run keyword if "${status}"=="0" log non-execution
|
|
|
|
|
|
... ELSE IF "${status}"=="1" log executing
|
|
|
|
|
|
... ELSE IF "${status}"=="2" Exit For Loop
|
|
|
|
|
|
... ELSE log Exec failure
|
|
|
|
|
|
END
|
|
|
|
|
|
#Report报表详情查询
|
2020-06-22 19:33:59 +08:00
|
|
|
|
${response1} BaseGetRequestOK ${result_url}/detail resultId=${resultId}&jobId=${reportId}
|
|
|
|
|
|
|
|
|
|
|
|
InsertFile datasetId ${datasetId}
|
|
|
|
|
|
InsertFile chartId ${chartId}
|
|
|
|
|
|
InsertFile reportId ${reportId}
|
|
|
|
|
|
InsertFile resultId ${resultId}
|
|
|
|
|
|
|
|
|
|
|
|
Report_Dashboard_Result-022
|
|
|
|
|
|
#新建DataSet,统计管控日志里的前一天的insert动作的会话数
|
|
|
|
|
|
${name} Set Variable Report_Dashboard_Result-022
|
|
|
|
|
|
BasePostRequestOK ${dataset_url} {"list":{"name":"${name}","logType":"proxy_event_log","filterConnector":"and","groupColumnList":[{"name":"common_sub_action"}],"queryColumnList":[{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_sub_action","expression":"","label":"Sub Action"}],"filterConditionList":[{"name":"common_sub_action","expression":"=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["insert"],"type":"string"}]}}
|
|
|
|
|
|
#根据name查询出该Dataset的id
|
|
|
|
|
|
${response} BaseGetRequestOK ${dataset_url} pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
|
|
|
|
|
${datasetId} Set Variable ${response}[data][list][0][id]
|
|
|
|
|
|
#根据DataSet的id,新建Chart,Table图形表
|
|
|
|
|
|
BasePostRequestOK ${chart_url} {"list":{"id":null,"name":"${name}","description":"","datasetId":${datasetId},"chartType":"table","dataTop":1,"orderBy":"","orderDesc":"","drilldownTop":null,"includeOther":false,"tableType":"Regular","columns":[{"title":"Sub Action","width":50,"dataBindings":[{"dataType":"","dataBinding":"Sub Action","format":"Default","legend":"","name":"common_sub_action"}]},{"title":"sessions","width":50,"dataBindings":[{"dataType":"","dataBinding":"sessions","format":"Default","legend":"","name":"common_log_id"}]}]}}
|
|
|
|
|
|
#根据name查询出该Chart的id
|
|
|
|
|
|
${response1} BaseGetRequestOK ${chart_url} pageSize=20&pageNo=1&id=&name=${name}&opUser=
|
|
|
|
|
|
${chartId} Set Variable ${response1}[data][list][0][id]
|
|
|
|
|
|
#新建Report,时间计划为yesterday,图表引用table。
|
|
|
|
|
|
BasePostRequestOK ${report_url} {"reportJobList":{"rangeType":"yesterday","rangeInterval":1,"jobName":"${name}","scheduleId":"","chartList":[{"chartId":${chartId},"timeGranulartiy":1,"timeUnit":"","disabled":true}],"isNotice":0,"noticeMethod":"","receiver":"","startTime":"","endTime":"","filterConnector":"and","filterCondition":[]}}
|
|
|
|
|
|
#查询Report的id
|
|
|
|
|
|
${response1} BaseGetRequestOK ${report_url} pageSize=20&pageNo=1&jobIds=&jobName=${name}&opStartTime=&opEndTime=&opUser=&scheduleId=
|
|
|
|
|
|
${reportId} Set Variable ${response1}[data][list][0][jobId]
|
|
|
|
|
|
#通过report的id,生成report报表
|
|
|
|
|
|
#BasePostRequestOK ${report_url} {"jobId":${reportId}}
|
|
|
|
|
|
#查询Report结果的状态,并判断状态结果,如果状态是执行成功,查看report结果内容
|
|
|
|
|
|
FOR ${i} IN RANGE 50
|
|
|
|
|
|
sleep 10
|
|
|
|
|
|
#report执行状态查询
|
|
|
|
|
|
${response1} BaseGetRequestOK ${result_url} jobId=${reportId}
|
|
|
|
|
|
${status} Set Variable ${response1}[data][list][0][status]
|
|
|
|
|
|
${resultId} Set Variable ${response1}[data][list][0][resultId]
|
|
|
|
|
|
run keyword if "${status}"=="0" log non-execution
|
|
|
|
|
|
... ELSE IF "${status}"=="1" log executing
|
|
|
|
|
|
... ELSE IF "${status}"=="2" Exit For Loop
|
|
|
|
|
|
... ELSE log Exec failure
|
|
|
|
|
|
END
|
|
|
|
|
|
#Report报表详情查询
|
|
|
|
|
|
${response1} BaseGetRequestOK ${result_url}/detail resultId=${resultId}&jobId=${reportId}
|
|
|
|
|
|
|
|
|
|
|
|
InsertFile datasetId ${datasetId}
|
|
|
|
|
|
InsertFile chartId ${chartId}
|
|
|
|
|
|
InsertFile reportId ${reportId}
|
|
|
|
|
|
InsertFile resultId ${resultId}
|
|
|
|
|
|
|
|
|
|
|
|
Report_Dashboard_Result-023
|
|
|
|
|
|
#新建DataSet,统计管控日志里的前一天的hijack动作的会话数
|
|
|
|
|
|
${name} Set Variable Report_Dashboard_Result-023
|
|
|
|
|
|
BasePostRequestOK ${dataset_url} {"list":{"name":"${name}","logType":"proxy_event_log","filterConnector":"and","groupColumnList":[{"name":"common_sub_action"}],"queryColumnList":[{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_sub_action","expression":"","label":"Sub Action"}],"filterConditionList":[{"name":"common_sub_action","expression":"=","expressionList":["=","!=","Prefix","Suffix","Sub","notEmpty"],"value":["hijack"],"type":"string"}]}}
|
|
|
|
|
|
#根据name查询出该Dataset的id
|
|
|
|
|
|
${response} BaseGetRequestOK ${dataset_url} pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
|
|
|
|
|
${datasetId} Set Variable ${response}[data][list][0][id]
|
|
|
|
|
|
#根据DataSet的id,新建Chart,Table图形表
|
|
|
|
|
|
BasePostRequestOK ${chart_url} {"list":{"id":null,"name":"${name}","description":"","datasetId":${datasetId},"chartType":"table","dataTop":1,"orderBy":"","orderDesc":"","drilldownTop":null,"includeOther":false,"tableType":"Regular","columns":[{"title":"Sub Action","width":50,"dataBindings":[{"dataType":"","dataBinding":"Sub Action","format":"Default","legend":"","name":"common_sub_action"}]},{"title":"sessions","width":50,"dataBindings":[{"dataType":"","dataBinding":"sessions","format":"Default","legend":"","name":"common_log_id"}]}]}}
|
|
|
|
|
|
#根据name查询出该Chart的id
|
|
|
|
|
|
${response1} BaseGetRequestOK ${chart_url} pageSize=20&pageNo=1&id=&name=${name}&opUser=
|
|
|
|
|
|
${chartId} Set Variable ${response1}[data][list][0][id]
|
|
|
|
|
|
#新建Report,时间计划为yesterday,图表引用table。
|
|
|
|
|
|
BasePostRequestOK ${report_url} {"reportJobList":{"rangeType":"yesterday","rangeInterval":1,"jobName":"${name}","scheduleId":"","chartList":[{"chartId":${chartId},"timeGranulartiy":1,"timeUnit":"","disabled":true}],"isNotice":0,"noticeMethod":"","receiver":"","startTime":"","endTime":"","filterConnector":"and","filterCondition":[]}}
|
|
|
|
|
|
#查询Report的id
|
|
|
|
|
|
${response1} BaseGetRequestOK ${report_url} pageSize=20&pageNo=1&jobIds=&jobName=${name}&opStartTime=&opEndTime=&opUser=&scheduleId=
|
|
|
|
|
|
${reportId} Set Variable ${response1}[data][list][0][jobId]
|
|
|
|
|
|
#通过report的id,生成report报表
|
|
|
|
|
|
#BasePostRequestOK ${report_url} {"jobId":${reportId}}
|
|
|
|
|
|
#查询Report结果的状态,并判断状态结果,如果状态是执行成功,查看report结果内容
|
|
|
|
|
|
FOR ${i} IN RANGE 50
|
|
|
|
|
|
sleep 10
|
|
|
|
|
|
#report执行状态查询
|
|
|
|
|
|
${response1} BaseGetRequestOK ${result_url} jobId=${reportId}
|
|
|
|
|
|
${status} Set Variable ${response1}[data][list][0][status]
|
|
|
|
|
|
${resultId} Set Variable ${response1}[data][list][0][resultId]
|
|
|
|
|
|
run keyword if "${status}"=="0" log non-execution
|
|
|
|
|
|
... ELSE IF "${status}"=="1" log executing
|
|
|
|
|
|
... ELSE IF "${status}"=="2" Exit For Loop
|
|
|
|
|
|
... ELSE log Exec failure
|
|
|
|
|
|
END
|
|
|
|
|
|
#Report报表详情查询
|
|
|
|
|
|
${response1} BaseGetRequestOK ${result_url}/detail resultId=${resultId}&jobId=${reportId}
|
|
|
|
|
|
|
|
|
|
|
|
InsertFile datasetId ${datasetId}
|
|
|
|
|
|
InsertFile chartId ${chartId}
|
|
|
|
|
|
InsertFile reportId ${reportId}
|
|
|
|
|
|
InsertFile resultId ${resultId}
|
|
|
|
|
|
|
|
|
|
|
|
Report_Dashboard_Result-024
|
|
|
|
|
|
#新建DataSet,统计管控日志里的前一天的命中策略前十的Policyid
|
|
|
|
|
|
${name} Set Variable Report_Dashboard_Result-024
|
|
|
|
|
|
BasePostRequestOK ${dataset_url} {"list":{"name":"${name}","logType":"proxy_event_log","filterConnector":"and","groupColumnList":[{"name":"common_policy_id"}],"queryColumnList":[{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[]},{"name":"common_policy_id","expression":"","label":"Policy ID"}],"filterConditionList":[]}}
|
|
|
|
|
|
#根据name查询出该Dataset的id
|
|
|
|
|
|
${response} BaseGetRequestOK ${dataset_url} pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
|
|
|
|
|
${datasetId} Set Variable ${response}[data][list][0][id]
|
|
|
|
|
|
#根据DataSet的id,新建Chart,Table图形表
|
|
|
|
|
|
BasePostRequestOK ${chart_url} {"list":{"id":null,"name":"${name}","description":"","datasetId":${datasetId},"chartType":"table","dataTop":10,"orderBy":"sessions","orderDesc":1,"drilldownTop":null,"includeOther":false,"tableType":"Regular","columns":[{"title":"Policy ID","width":50,"dataBindings":[{"dataType":"","dataBinding":"Policy ID","format":"Default","legend":"","name":"common_policy_id"}]},{"title":"sessions","width":50,"dataBindings":[{"dataType":"","dataBinding":"sessions","format":"Default","legend":"","name":"common_log_id"}]}]}}
|
|
|
|
|
|
#根据name查询出该Chart的id
|
|
|
|
|
|
${response1} BaseGetRequestOK ${chart_url} pageSize=20&pageNo=1&id=&name=${name}&opUser=
|
|
|
|
|
|
${chartId} Set Variable ${response1}[data][list][0][id]
|
|
|
|
|
|
#新建Report,时间计划为yesterday,图表引用table。
|
|
|
|
|
|
BasePostRequestOK ${report_url} {"reportJobList":{"rangeType":"yesterday","rangeInterval":1,"jobName":"${name}","scheduleId":"","chartList":[{"chartId":${chartId},"timeGranulartiy":1,"timeUnit":"","disabled":true}],"isNotice":0,"noticeMethod":"","receiver":"","startTime":"","endTime":"","filterConnector":"and","filterCondition":[]}}
|
|
|
|
|
|
#查询Report的id
|
|
|
|
|
|
${response1} BaseGetRequestOK ${report_url} pageSize=20&pageNo=1&jobIds=&jobName=${name}&opStartTime=&opEndTime=&opUser=&scheduleId=
|
|
|
|
|
|
${reportId} Set Variable ${response1}[data][list][0][jobId]
|
|
|
|
|
|
#通过report的id,生成report报表
|
|
|
|
|
|
#BasePostRequestOK ${report_url} {"jobId":${reportId}}
|
|
|
|
|
|
#通过report的id,生成report报表
|
|
|
|
|
|
|
|
|
|
|
|
#查询Report结果的状态,并判断状态结果,如果状态是执行成功,查看report结果内容
|
|
|
|
|
|
FOR ${i} IN RANGE 50
|
|
|
|
|
|
sleep 10
|
|
|
|
|
|
#report执行状态查询
|
|
|
|
|
|
${response1} BaseGetRequestOK ${result_url} jobId=${reportId}
|
|
|
|
|
|
${status} Set Variable ${response1}[data][list][0][status]
|
|
|
|
|
|
${resultId} Set Variable ${response1}[data][list][0][resultId]
|
|
|
|
|
|
run keyword if "${status}"=="0" log non-execution
|
|
|
|
|
|
... ELSE IF "${status}"=="1" log executing
|
|
|
|
|
|
... ELSE IF "${status}"=="2" Exit For Loop
|
|
|
|
|
|
... ELSE log Exec failure
|
|
|
|
|
|
END
|
|
|
|
|
|
#Report报表详情查询
|
|
|
|
|
|
${response1} BaseGetRequestOK ${result_url}/detail resultId=${resultId}&jobId=${reportId}
|
|
|
|
|
|
|
|
|
|
|
|
InsertFile datasetId ${datasetId}
|
|
|
|
|
|
InsertFile chartId ${chartId}
|
|
|
|
|
|
InsertFile reportId ${reportId}
|
|
|
|
|
|
InsertFile resultId ${resultId}
|