From cada5b5c9067b994a429be7b67baddcf4d72df9d Mon Sep 17 00:00:00 2001 From: Grzegorz Budny Date: Wed, 10 Jul 2019 12:33:20 +0200 Subject: [PATCH] Initial Commit. File Created --- RouterOS_Log_To_Alert.rsc | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/RouterOS_Log_To_Alert.rsc b/RouterOS_Log_To_Alert.rsc index 8d97c43..06ca031 100644 --- a/RouterOS_Log_To_Alert.rsc +++ b/RouterOS_Log_To_Alert.rsc @@ -1,5 +1,21 @@ -#log print where message~"telnet" -#log print file= +:global SendEmail do={ + +:local smtpServer #smtp server IP +:local smtpPort #smtp port +:local from #sender email +:local to #recipeints email +:local cc #cc email +:local subject #email subject +:local body #email body + +:log info "..::Sending email notification::.."; +tool e-mail send server=$smtpServer port=$smtpPort from=$from to=$to cc=$cc subject=$subject body=$body; + +} + +#Here script starts + + + -#filter log and if match send alert via email