{
    "name"  : "分支隧道认证检查",
    "problems" : {
        "flowError" : {
            "desc"      : "【问题】隧道认证密码错误。",
            "advice"    : "【建议】请检查两边隧道认证的密码。"
        }
    }
}
---------------------------code-------------------------------
isServer= precondition('isServer')
print isServer
if isServer == true :
	print 'skip'
	return 'skip'
end
res = cli("show logging")
print res
time = res.match(/\d+:\d+/ig)
print "^^^^^^^^^^^^^"+time 
tim = time[time.length-1]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
print "^^^^^^^^^^^^^"+tim
ti = tim.split(/:/)
print "-------"+ ti[0]+":"+ti[1]
if ti[1] < 1 :
	ti[1] =ti[1]+60
	if ti[0] < 1 :
		ti[0]=ti[0]+24
	end
	ti[0] =ti[0]-1
end
ti[1] = ti[1] - 1
if ti[1] < 10 :
	ti[1] = "0" + ti[1]
end
print "-------"+ ti[0]+":"+ti[1]
stri = ti[0]+":"+ti[1]
numb = 1
resS = res.split(/\r?\n/ig)
print resS
while numb < (resS.length-1) :
	res = resS[numb]
	if res.match(stri) !=null || res.match(tim) !=null :
		resArr = res.match(/L2TP \d+\.\d+\.\d+\.\d+ is unreachable, Tunnel authentication failed/ig)
		print resArr
		if resArr != null :
			print 'warn'
			add_problem("flowError")
			return 'warn'
		end
	end
	numb =numb +1
end
print 'success'
return 'success'