# script to check current MikroTik device temperature :global TelegramQueue; :local TempThreshold 35; :local Debug false; :local CurrentTemp [/system health get temperature]; :if ($Debug) do={ :put "Current temp: $CurrentTemp"; } # check if threshold breached & generate alert :if ($CurrentTemp > $TempThreshold) do={ :local AlertMessage "!! Alert: Mikrotik core temp is: $CurrentTemp"; :log error $AlertMessage; :set TelegramQueue ($TelegramQueue, $AlertMessage); :if ($Debug) do={ :put $AlertMessage } } :if ($Debug) do={ :put "Script completed."; }