Download Script:
:local CurDate [/system clock get date]
:local CurTime [/system clock get time]
:local DSpeed "10Mbps"
:local StatusTraffic "Download"
:local OnInterface "Bridge-LAN"
#WriteDown2Log
:log info "$StatusTraffic speed is more then $DSpeed at $CurTime $CurDate on interface $OnInterface"
#SMS
/tool sms send phone-number="077272270" port=usb2 message="$StatusTraffic speed is more then $DSpeed at $CurTime $CurDate on interface $OnInterface.
Alert by Phalla.......................................!"
/tool e-mail send to="phalla.ccmt@gmail.com" subject="$StatusTraffic speed is more then $DSpeed at $CurTime $CurDate" body="$StatusTraffic speed is more then $DSpeed at $CurTime $CurDate on interface $OnInterface.
Alert by Phalla...........................................!"
Upload Script:
:local CurDate [/system clock get date]
:local CurTime [/system clock get time]
:local DSpeed "10Mbps"
:local StatusTraffic "Upload"
:local OnInterface "Bridge-LAN"
#WriteDown2Log
:log info "$StatusTraffic speed is more then $DSpeed at $CurTime $CurDate on interface $OnInterface"
#SMS
/tool sms send phone-number="077272270" port=usb2 message="$StatusTraffic speed is more then $DSpeed at $CurTime $CurDate on interface $OnInterface.
Alert by Phalla.......................................!"
/tool e-mail send to="phalla.ccmt@gmail.com" subject="$StatusTraffic speed is more then $DSpeed at $CurTime $CurDate" body="$StatusTraffic speed is more then $DSpeed at $CurTime $CurDate on interface $OnInterface.
Alert by Phalla...........................................!"
3 comments
Write commentsHi Guys,
ReplyI have tried this script. It emails me but it only writes
"Speed is more then at" on the subject line. Then its blank.
Could you identify why?
Thanks.
Hi Guys,
ReplyI tried to get this to work, however, I only receive an email with subject "speed is more than at". No body or anything else.
Any help on this would be really great!
Thanks.
I don't use this, but it looks to me that the problem is that the entire thing is in quotes but is using variables. A variable inside the quotation marks would only show exactly what is written. So it appears it should look more like this:
Reply#Email
/tool e-mail send to="phalla.ccmt@gmail.com" subject="$StatusTraffic speed is more than";$DSpeed;"at";$CurTime $CurDate body="$StatusTraffic speed is more than" $DSpeedat "at" $CurTime $CurDate "on interface" $OnInterface
But it's been a decade since I coded anything at all. lol there may need to be commas or semicolons in there to separate the quotes from the input data. And that's just my best guess. I just ran across this browsing for something else entirely and thought I could at least get you pointed in the right direction since it appears that the author isn't responding.
EmoticonEmoticon