Email on high Temperature script not working

Hi there,
I’m trying to create a high temperature script but when I receive the email I don’t get a temperature display. Could someone take a look please.

/system health
:if ([get temperature]>70) do={/tool e-mail send to=“XXXXX@XXXXXX” subject=[/system identity get name] body=(“High temperature. Current temperature is :”.[/system health get temperature])} else {:log info “temperature is ok.”}

seems okay. what if

{:log info "temperature is ok."}

is changed to

{:log info ("temperature is ok.".[/system health get temperature])}

?..

what version do you use?

Thanks for your input I’ll give it ago when I have access to the unit.
I’m actually running v4.10.

hmm ok - I’ve tested the script:

:if ([get temperature]>10) do={/tool e-mail send to=“XXX@XXXX” subject=[/system identity get name] body=(“High temperature. Current temperature is :”.[/system health get temperature])} else {:log info (“temperature is ok.”.[/system health get temperature])}

But it seems now I’m not getting any emails nor is it working correctly - in the RB log it just stating temperature ok.

/system health print

do you see the temperature on that router at all?..

Yes it I can see it either through winbox or terminal - and it works fine there.

:log info ("temperature is ok.".[/system health get temperature])

works fine for me on v4.10, RB450G:

18:45:18 script,info temperature is ok.31

Ok I’ve tested it again - RB450G - works fine.
But on the issue RB800 - doesn’t work.

Both 4.10v and latest bootloader.

I’ve been playing around with this more and I believe it must be a bug in the firmware, as to why its not reporting correctly.
I’ll send it over to MK.

sounds a bit crazy…

please post the result here =)

:if ([get cpu-temperature ]> 10) do={ ... }

the problem is, RB800 have CPU probe, so reported temperature is actually cpu-temperature, while RB540G have on-board probe, that reports ambient temperature near some hot parts and is reported as temperature. It is done so to reduce confusion in case there is board with both probes.

Thank you!

Hi there,
I’m trying to create a high temperature script

btw: is there an OID to get the rb800 CPU temperature at all? I don’t see it in Mikrotik.mib.



[admin@MikroTik] /system health> print oid
   active-fan: .1.3.6.1.4.1.14988.1.1.3.9.0
      voltage: .1.3.6.1.4.1.14988.1.1.3.8.0
  temperature: .1.3.6.1.4.1.14988.1.1.3.10.0