{
    "name"  : "诊断日志信息",
    "problems" : {
        "LOG_info" : {
            "desc"      : "【问题】检测到${0}日志信息:${1}",
            "advice"    : "【建议】重启设备，如果重启设备任无法解决问题，则需要更换板卡"
        }
    }	
}
---------------------------code-------------------------------
res = cli('show logging')
#res = "HPGTRB-5-LINE_CARD_EXCEPTION: CTRL_PCIE_HEART modulec CPU utilization in five seconds:  0.00%\r\nCPU utilization in one minute  :  1.45%\r\nCPU phy match faill! in five minutes:  0.32%\r\n  NO   5Sec   1Min   5Min   Process \r\n  0   0.00%   0.00%   21.00%    LISR INT \r\n  1   0.00%   0.00%   0.01%    HISR INT \r\n  2   0.00%   0.00%   0.00%    ktimer \r\n  3   0.00%   0.00%   0.00%    atimer \r\n  4   0.00%   0.00%   0.00%    printk_task" 
is_found_problem = false
exception  = res.match(/HPGTRB-5-LINE_CARD_EXCEPTION:\s+CTRL_PCIE_HEART\s+module/g)
print exception	
if exception == null :
else :
    err_type = "PCIE芯片故障"
    add_problem('LOG_info',[err_type,exception])
    is_found_problem = true
end

exception = res.match(/phy\s+match\s+fail/g)
print exception
if exception == null :

else :
	err_type = "PHY芯片BCM5482S故障"
	add_problem('LOG_info',[err_type,exception])
	is_found_problem = true
	return 'warn'
end

if is_found_problem == true :
    return 'warn'
else :
    return 'success'
end


