PPPoe接口掉线复连告警配置教程

适用于单ADSL拨号入口,提供用于断开网络后的告警配置思路,对于多入口配置不再赘述。


{
/ppp profile
set 0 on-down=":global pppWarningDown 1\r\
    \n:global pppDownTime ([/sys clock get date].\" \".[/sys clock get time])" on-up=\
    ":global pppWarningNum 0"
/sys sch
remove [find name="\BF\ED\B4\F8\B5\F4\CF\DF\BC\E0\B2\E2"]
add interval=5s name="\BF\ED\B4\F8\B5\F4\CF\DF\BC\E0\B2\E2" on-event="{#2022-5-5 RosZ.cn By:S\
    ealin WeChat:302268\r\
    \n:global pppWarningNum\r\
    \n:global pppWarningDown\r\
    \n:global pppDownTime\r\
    \n:local pppup\r\
    \n:local pppip\r\
    \n:local pppname [/int pppoe-c get 0 name]\r\
    \n:local pppuser [/int pppoe-c get 0 user]\r\
    \n/int pppoe-c monitor 0 once do={\r\
    \n:set pppup \$\"uptime\"\r\
    \n:set pppip \$\"local-address\"\r\
    \n}\r\
    \n:if (\$pppWarningDown=1 and \$pppup>[:totime \"1m\"]) do={\r\
    \n\t:set pppWarningDown 0\r\
    \n\t:log warning \"\$pppname \B6\CF\BF\AA\A3\AC\CA\B1\BC\E4\A3\BA\$pppDownTime \A3\AC\BF\
    \ED\B4\F8\D5\CB\BA\C5\A3\BA\$pppuser\"\r\
    \n}\r\
    \n:if (\$pppWarningNum=0 and \$pppup>[:totime \"1m\"]) do={\r\
    \n\t:set pppWarningNum 1\r\
    \n\t:log warning \"\$pppname \C1\AC\BD\D3\B3\C9\B9\A6\A3\AC\BF\ED\B4\F8\D5\CB\BA\C5\A3\BA\
    \$pppuser\A3\ACIP\B5\D8\D6\B7\A3\BA \$pppip\"\r\
    \n}\r\
    \n}" policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon start-time=\
    startup
}

 

宽带复连告警配置