{
    "name"  : "CPU利用率是否过高",
    "problems" : {
        "cpuHigh" : {
            "desc"      : "【问题】设备处于CPU高的异常状态",
            "advice"    : "【建议】设备CPU使用率偏高，可能会影响设备稳定运行。建议show cpu查看哪个进程消耗CPU，若长时间CPU高负载，请联系400处理。"
        }
    }
}
---------------------------code-------------------------------
res = cli("show cpu\r\n")
resArr = res.split(/\r?\n/)
fiveSecondsStr = resArr[3]
fiveMinutesStr = resArr[5]
fiveSecondsArr = fiveSecondsStr.match(/five seconds:\s+(.+)%/)
fiveMinutesArr = fiveMinutesStr.match(/five minutes:\s+(.+)%/)
fiveSeconds = fiveSecondsArr[1]
fiveMinutes = fiveMinutesArr[1]

if fiveSeconds > 80 || fiveMinutes > 80 :
    add_problem("cpuHigh")
    return "warn"
end

return "success"