CPU效能監控發送即時告警,DeviceAverageLoadThreshold設定為CPU平均用量超過40%,送出Slack告警通知
/system scheduler
add interval=5m name=CPUOverloadCheck on-event=":local ScriptName \"CPUOverloadCheck\";\r\
\n:local ScriptRunning [system script job find where script=\$ScriptName];\r\
\n:if (\$ScriptRunning) do={\r\
\n :log info \"The script \$ScriptName cannot be run, the script is already running (Change the NumberOfMeasurements to redu\
ce the script)\";\r\
\n} else={\r\
\n /system script run \$ScriptName;\r\
\n}" policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon start-time=startup
(繼續閱讀...)