{
    "name"  : "web认证流量下线检测检查",
    "problems" : {
        "flowError" : {
            "desc"      : "【问题】开启web认证功能，并配置了下线检测，若检测流量配置为非0，可能出现流量检测不太准的情况。",
            "advice"    : "【建议】建议将流量下线检测配置为0。"
        }
    }
}
---------------------------code-------------------------------
res = cli("show run | in web-auth enable")
resArr = res.split(/\r?\n/)
if !resArr[2] :
    return 'success'
end

res = cli("show run | in layer23 flow-detect flow")
resArr = res.split(/\r?\n/)
resCli = resArr[1]
resMatch = resCli.match(/flow (.+)/)
matchRes = resMatch[1]
if resArr.length > 2 && matchRes != 0:
    add_problem("flowError")
    return "warn" 
else :
    return 'success'
end
