Network Cable unplugged?

Hello

Is there a script I can run that will tell me if the network cable is unplugged on ether1?

I am making a 12v UPS and using a loopback cable to tell me if teh powers one or off (cable looped or not)

Thanks :slight_smile:

I got this so far

/interface ethernet monitor [/interface ethernet find name "ether5"] once do { 
:if ($status="no-link") do { 
/tool e-mail send to="equis@mymailadd.com.au" subject=("Power Failure At") body=("Power Failure at at") 
} 
}

is the ok?

I get error sending in log, need to find where to put smtp server
Would someone know where to put smtp server?

Thanks :slight_smile:



EDIT: /tool e-mail set



:slight_smile:

OK, Last problem

Can I get it to email ony when its changed?

It currently emails me every min :frowning:

Thanks

Set global variable which is set to true if email already sent. And set to false if link is ok :slight_smile:

Thanks :slight_smile: