{
    "name"  : "端口出现频繁震荡",
    "problems" : {
        "sta_change" : {
            "desc"      : "【问题】端口${0}反复震荡，该问题会影响该端口报文转发，例如丢包、时延高等。",
            "advice"    : "【建议】请检查问题端口线缆及模块，有必要建议更换正常模块及线缆。"
        }
    }
}
---------------------------code-------------------------------
intf_sta = cli('show interface link-state-change statistics')
intf_staList = intf_sta.split("\r\n")
reg = /([^ ]+)\s+\w{2,4}\s+(\d+)\s+[^ ]+\s+[^ ]+/
result = "pass"
port = ""
foreach data in intf_staList:
    r = data.match(reg)
    if r != null:
        if r[2] >= 500:
            result = "fail"
            port = port + r[1] + "("+r[2]+"次)、"
        end
    end
end
if result == "fail":
    change_title('检测端口出现反复震荡')
    add_problem('sta_change',[port])
    return 'warn'
end
return 'success'