Community discussions

MUM Europe 2020
 
bigguns
Member Candidate
Member Candidate
Topic Author
Posts: 238
Joined: Thu Apr 01, 2010 9:03 am

Email on high Temperature script not working

Mon Jun 14, 2010 2:26 am

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."}
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8320
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: Email on high Temperature script not working

Mon Jun 14, 2010 2:39 am

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?
Russian-speaking forum: https://forum.mikrotik.by/. Welcome!

For every complex problem, there is a solution that is simple, neat, and wrong.

MikroTik. Your life. Your routing.
 
bigguns
Member Candidate
Member Candidate
Topic Author
Posts: 238
Joined: Thu Apr 01, 2010 9:03 am

Re: Email on high Temperature script not working

Mon Jun 14, 2010 8:52 am

Thanks for your input I'll give it ago when I have access to the unit.
I'm actually running v4.10.
 
bigguns
Member Candidate
Member Candidate
Topic Author
Posts: 238
Joined: Thu Apr 01, 2010 9:03 am

Re: Email on high Temperature script not working

Mon Jun 14, 2010 9:22 pm

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.
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8320
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: Email on high Temperature script not working

Mon Jun 14, 2010 9:28 pm

/system health print
do you see the temperature on that router at all?..
Russian-speaking forum: https://forum.mikrotik.by/. Welcome!

For every complex problem, there is a solution that is simple, neat, and wrong.

MikroTik. Your life. Your routing.
 
bigguns
Member Candidate
Member Candidate
Topic Author
Posts: 238
Joined: Thu Apr 01, 2010 9:03 am

Re: Email on high Temperature script not working

Mon Jun 14, 2010 9:39 pm

Yes it I can see it either through winbox or terminal - and it works fine there.
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8320
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: Email on high Temperature script not working

Mon Jun 14, 2010 9:46 pm

: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
Russian-speaking forum: https://forum.mikrotik.by/. Welcome!

For every complex problem, there is a solution that is simple, neat, and wrong.

MikroTik. Your life. Your routing.
 
bigguns
Member Candidate
Member Candidate
Topic Author
Posts: 238
Joined: Thu Apr 01, 2010 9:03 am

Re: Email on high Temperature script not working

Mon Jun 14, 2010 9:58 pm

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

Both 4.10v and latest bootloader.
 
bigguns
Member Candidate
Member Candidate
Topic Author
Posts: 238
Joined: Thu Apr 01, 2010 9:03 am

Re: Email on high Temperature script not working

Tue Jun 15, 2010 12:06 am

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.
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8320
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: Email on high Temperature script not working

Tue Jun 15, 2010 12:22 am

sounds a bit crazy...

please post the result here =)
Russian-speaking forum: https://forum.mikrotik.by/. Welcome!

For every complex problem, there is a solution that is simple, neat, and wrong.

MikroTik. Your life. Your routing.
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 5950
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: Email on high Temperature script not working

Tue Jun 15, 2010 9:49 am

:if ([get cpu-temperature ]> 10) do={ ... }
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6283
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: Email on high Temperature script not working

Tue Jun 15, 2010 10:00 am

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.
 
bigguns
Member Candidate
Member Candidate
Topic Author
Posts: 238
Joined: Thu Apr 01, 2010 9:03 am

Re: Email on high Temperature script not working

Tue Jun 15, 2010 10:32 am

Thank you!
 
januszzz
Member Candidate
Member Candidate
Posts: 102
Joined: Wed Oct 07, 2009 9:17 pm

Re: Email on high Temperature script not working

Thu Jun 17, 2010 1:29 am

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.
 
fewi
Forum Guru
Forum Guru
Posts: 7734
Joined: Tue Aug 11, 2009 3:19 am

Re: Email on high Temperature script not working

Thu Jun 17, 2010 2:01 am

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

Who is online

Users browsing this forum: No registered users and 11 guests