Community discussions

 
plisken
Forum Guru
Forum Guru
Topic Author
Posts: 2390
Joined: Sun May 15, 2011 12:24 am
Location: Belgium
Contact:

SOLVED Switch on PoE-out when the CPU temperature is too high

Fri Mar 22, 2019 7:00 am

Hello, I would like a script that turns on the PoE-out if the CPU temperature of the router gets too high. Temperature adjustable.
This by script in schedullar.
Does anyone have an idea?
Hoping that someone can help
 
User avatar
Jotne
Forum Guru
Forum Guru
Posts: 1145
Joined: Sat Dec 24, 2016 11:17 am
Location: Magrathean

Re: Switch on PoE-out when the CPU temperature is too high

Fri Mar 22, 2019 5:15 pm

This should get you startet.
I do not have PoE interface, so could not test that.
:if ([/system health get temperature] >= 40) do={
/interface ethernet set ether1 poe-out=forced-on
}
Save this as a script and run it as a schedule job.

To add from cli (10 minute interval and 40 degree as limit)
/system script
add dont-require-permissions=no name=Temperatur-PoE owner=admin policy=\
    ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source=\
    ":if ([/system health get temperature] >= 40) do={\r\
    \n:put \"yes\"\r\
    \n} "

/system scheduler
add interval=10m name=PoE-test on-event=Temperatur-PoE policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \
    start-date=mar/22/2019 start-time=15:30:00
 
How to use Splunk to monitor your MikroTik Router

MikroTik->Splunk
 
 
plisken
Forum Guru
Forum Guru
Topic Author
Posts: 2390
Joined: Sun May 15, 2011 12:24 am
Location: Belgium
Contact:

Re: Switch on PoE-out when the CPU temperature is too high

Fri Mar 22, 2019 9:52 pm

Hello Jotne, it works like a charm, you are great with scripts.

Thank you verry verry match

Who is online

Users browsing this forum: No registered users and 4 guests