{
    "name"  : "检查商业营销认证用户容量是否空闲",
    "problems" : {
        "max_capacity" : {
            "desc"      : "【问题】用户容量达到上限可导致用户认证异常",
            "advice"    : "【建议】1、检查是否关闭了流量检测下线功能。 2、确认设备使用环境用户数是否超出了设备负载能力" 
        }
    }
}

---------------------------code-------------------------------
response = cli('show app-auth capacity')
response = response.split(/\r?\n/)
i = 1
z = 0
while i < response.length :
    res = response[i]
	res = res.trim()
	reg = /ip_node/
	if reg.test(res) == true :
        res1 = res.split(/\s+/)
		t = res1[1]
		print t
		y = res1[3]
		print y
		if t <= 2 * y :
		    add_problem("max_capacity")
	        return 'warn'
		end
		z = z + 1
    end
	i = i + 1
end

if z == 0 :
    add_reason("无ip_node返回内容")
    return 'skip'
end

return 'success'