GTONE采集、分析服务器在日常执行任务时,会因为一些客观因素导致部分任务执行失败,从而导致在查询日志时,存留一些实际任务的采集、分析任务不匹配的情况,此时我们可以通过SQL进行日常清理操作.
见如下图所示的部分采集、分析任务:
执行删除非正常采集、分析任务的SQL(还可以添加更多的过滤条件,具体定位到某一个具体的JOBID)
DELETE CM_JOB_SRC_LOG WHERE JOB_ID IN (SELECT JOB_ID FROM CM_JOB_LOG WHERE JOB_STATUS = 1000); DELETE CM_JOB_STEP_LOG WHERE JOB_ID IN (SELECT JOB_ID FROM CM_JOB_LOG WHERE JOB_STATUS = 1000); DELETE CM_JOB_STAT_LOG WHERE JOB_ID IN (SELECT JOB_ID FROM CM_JOB_LOG WHERE JOB_STATUS = 1000); DELETE CM_JOB_LOG WHERE JOB_STATUS = 1000 /* (job_status) 1000 正在执行中 2000 成功完成 3000 重启作业 4000 取消作业 9000 失败 */