/system script
add comment="Send Email When CPU Goes 100%(www.itlearnweb.com)" name=cpu owner=admin policy=\
ftp,reboot,read,write,policy,test,password,sniff,sensitive source=":global sub1 ([/system identity get name])\r\
\n:global sub2 ([/system clock get time])\r\
\n:global sub3 ([/system clock get date])\r\
\n:global sub4 \"CPU LOAD 100%\"\r\
\n:global adminrece #YOUR@gmail.com\r\
\n:global gmailid #YOUR@gmail.com\r\
\n:global user #USER\r\
\n:global gmailpwd #YOUR PWD\r\
\n:global gmailip 74.125.136.108\r\
\n/tool e-mail \r\
\nset address=\$gmailip from=\$gmailid password=\$gmailpwd port=25 start-tls=yes user=\$user\r\
\n/tool e-mail send to=\$adminrece subject=\"\$sub4 \$sub3 \$sub2 \$sub1\" body=\"Please Check something is wrong ##CPU 100%## \"\r\
\n/"
/system scheduler
add comment="Send Email When CPU Goes 100%(www.fr.net.br)" interval=5s name=cpu on-event=\
":if ([ /system resource get cpu-load]>100) do={ /system script run [find name=cpu]; }\r\
\n/" policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive start-time=startup
/system note set note="Server Configuration By
fonte: http://www.itlearnweb.com/2016/07/mikrotik-send-email-when-cpu-goes-100.html
0 comentários:
Postar um comentário