{
    "name"  : "检查配置错误",
    "precondition" : ["name"],
    "problems" : {
        "problem1" : {
            "desc"      : "【问题】用户没有开启加速",
            "advice"    : "【建议】开启加速，在全局模式，执行was  enable，第一次开启会提示重启"
        },
		"problem2" : {
			"desc"      : "【问题】用户没有大文件缓存加速功能",
            "advice"    : "【建议】开启网页缓存加速，在全局模式，执行was http cache file enable"
		},
		"problem3" : {
			"desc"      : "【问题】无",
            "advice"    : "【建议】提示是否需要配置静态匹配规则，在全局模式下，执行in-path rule auto-discovery accelerate http dstport port (端口) dstaddr (ip地址 + 掩码) rulenum start  "
		}
    }
}
---------------------------code-------------------------------
#检查是否开启加速---ok
result=cli("show was status")
reg=(/off/)
result=(result.split(/\r?\n/))
result =result[1]
if reg.test(result) == true:
	add_problem("problem1")
	return "warn"
end

#检查是否开启大文件缓存加速功能---ok
result=cli('show was http cache config')
result=result.split(/\r?\n/)
count =0
foreach item in result :
	if item=='file' :
		count=count+1
		break
	end
	count=count+1
end
reg=(/off/)
result=result[count]
if reg.test(result) :
	add_problem('problem2')
	return 'warn'
end

#检查是否配置静态匹配规则---ok
result=cli('show in-path rules | inc http')
result=result.split(/\r?\n/)
result=len(result)
if result<=2 :
	add_problem('problem3')
	return 'warn'
end
return 'success'
'''