Can someone help me with a script that sends an email if the temperature of the Mikrotik router gets too high?
Both the CPU and the board temperature.
Thanks
Hello,
this is what I use at the moment. It is hacked from someone else 8-}
:log info ("$[/system health get temperature] $[/system health get voltage]")
:if ([/system health get temperature]>45) do={/tool e-mail send to="me@somewhere.net" subject=[/system identity get name] body=("High temperature. Current temperature is: ".[/system health get temperature])}
:if ([/system health get voltage]<245) do={/tool e-mail send to="me@somewhere.net" subject=[/system identity get name] body=("Low Voltage Alarm. Current voltage is: ".[/system health get voltage])}
You need to setup tools->email for it to work. In the above, 45 is an arbitrary temperature that I use as a limit.
Also, since this is a battery powered site, I also have a limit of 24.5V. Any less than that, I have the router send me an email.
Hope it helps, I know you provide a lot of info for others.
Thanks rjscomms, Yes, I want to help people as much as possible with Mikrotik routers and networks. And this in a simple way. I myself am not technically trained with networking but for me this is a hobby to investigate. Many thanks for your help, I appreciate this.