Community discussions

MUM Europe 2020
 
User avatar
Equis
Forum Veteran
Forum Veteran
Topic Author
Posts: 888
Joined: Mon Jun 06, 2005 6:48 am

Poor man UPS Monitor

Wed Jan 10, 2007 2:15 am

Hello

I am going to run my remote AP's of 12v SLA and chargers.

I was thinking of connecting a $10 switch to ether2 and plugging the switch into main power.

I'd like a script to tell when ether1 has 'no link' and then email me.

I have never wrote a MT script before and had a glance at the manual and ran the other way...

Can anyone help with this?
 
vk7zms
Member Candidate
Member Candidate
Posts: 227
Joined: Thu Jun 29, 2006 3:01 am
Location: Hobart, Tasmania
Contact:

Sat Jan 13, 2007 12:09 pm

I have done this a couple of times - it works well. I use the following script x2 (one for power up and one for power down). then use the netwatch tool to advise whenever the state changes.

hope this helps


:global datetime ([/system clock get time] . " - " . [:pick[/system clock get date] 4 6] . "-" . [:pick [/system clock get date]0 3] . "-" . [:pick[/system clock get date] 7 11])

{/tool e-mail send to=myemailaddrss@.myisp.com subject=("site-id Power Failure At " . $datetime) body=("site-id Power Failure at " . $datetime)
}
 
User avatar
Equis
Forum Veteran
Forum Veteran
Topic Author
Posts: 888
Joined: Mon Jun 06, 2005 6:48 am

Sun Jan 14, 2007 10:24 am

Thanks for that

With netwatch, what do you ping to tell if the power is down?

Thanks :-)
 
vk7zms
Member Candidate
Member Candidate
Posts: 227
Joined: Thu Jun 29, 2006 3:01 am
Location: Hobart, Tasmania
Contact:

Sun Jan 14, 2007 11:32 am

well - I just ping on old swith that plugs directly into the mains - so when the power goes off and the router is running from UPS (or battery bank), you know the sight has lost power. You can use an old switch or print server or anything you have laying around that has an IP address.
 
User avatar
Equis
Forum Veteran
Forum Veteran
Topic Author
Posts: 888
Joined: Mon Jun 06, 2005 6:48 am

Sun Jan 14, 2007 11:44 am

Neat, Thanks for that :-)

Thats what I'll do, all the old routers I was going to throw away I'll make use of :-)

If it drops a single ping will it send the email?
Of only if it times out a few times.

Thanks

:-)
 
vk7zms
Member Candidate
Member Candidate
Posts: 227
Joined: Thu Jun 29, 2006 3:01 am
Location: Hobart, Tasmania
Contact:

Sun Jan 14, 2007 12:47 pm

Not realy sure on how many pings it takes - havn't read the manual - lol. Just used the feature. All I can say is I have had very few false alarms - perhaps one a month (I have 11 sites monitored in this way). I have them sending the emails via an sms gateway to my phone. I set it to monitor the host every 30 seconds so if it does give a false power down alarm it corrects it in 30 seconds - so no harm done.
 
User avatar
Equis
Forum Veteran
Forum Veteran
Topic Author
Posts: 888
Joined: Mon Jun 06, 2005 6:48 am

Sun Jan 14, 2007 12:58 pm

No Problems

I might try use the dude for this, it has down count and email feature.

It also has a 'depends on" feature so if a router goes down on the way it wont think its down when its not.

Thanks :-)
 
vk7zms
Member Candidate
Member Candidate
Posts: 227
Joined: Thu Jun 29, 2006 3:01 am
Location: Hobart, Tasmania
Contact:

Sun Jan 14, 2007 1:02 pm

I usually just set up the netwatch feature on the MT box in question so there is no routers inbetween - ie run netwatch on the MT box running on batteries and have the old switch (or print server - lol) plugged in via ethernet.

Having said that - the dude has some really cool features like that :)

Who is online

Users browsing this forum: No registered users and 22 guests