{
    "name"  : "设备逃生检测是否生效",
    "problems" : {
        "device_escape" : {
            "desc"      : "【问题】由于设备无法和服务器通信，逃生功能生效，所以无需认证就可以直接上网",
            "advice"    : "【建议】检查设备和服务器间的通信链路是否正常" 
        }
    }
}

---------------------------code-------------------------------

res = cli("show app-auth statistics")
if res.search(/server_status/) == -1 :
    return 'success'
end

res = res.split(/server_status: /)
res = res[1]
res = res.split(/\r?\n/)
print res[0]

if res[0] == 0 :
	add_problem("device_escape")
    return 'warn'
else :
	return 'success'
end