mirror of
https://github.com/gbudny93/RouterOS_Useful_Scripts.git
synced 2025-06-23 02:08:43 +02:00
Initial Commit. Script draft created
This commit is contained in:
parent
cada5b5c90
commit
260dc3f1b2
1 changed files with 17 additions and 0 deletions
|
@ -15,6 +15,23 @@ tool e-mail send server=$smtpServer port=$smtpPort from=$from to=$to cc=$cc subj
|
|||
|
||||
#Here script starts
|
||||
|
||||
:local message "telnet"
|
||||
:local systemName [/system identity get value-name=name]
|
||||
:local recipient
|
||||
:local logCount [/log print count-only where message~$message]
|
||||
:local logArray [/log find where message~$message]
|
||||
|
||||
:toarray value=$logArray
|
||||
|
||||
:if (logCount > 0) do={
|
||||
|
||||
:log warning "..::Alert detected:..";
|
||||
$SendEmail smtpServer="10.27.23.62" smtpPort=25 from=($systemName."@paccor.com") to=$recipient subject=($systemName." Triggered and Alert!") body=($logArray->1)
|
||||
:log info ("..::Alert has been sent to ".$recipient)
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue