Community discussions

MikroTik App
 
snoozer
Member Candidate
Member Candidate
Topic Author
Posts: 154
Joined: Mon Jun 18, 2007 5:13 pm
Location: Schull, West-Cork, Ireland.

RB333 voltage monitoring -> alarm email

Sat Mar 15, 2008 10:38 am

hi @ all,

has anyone done this ? having the voltage monitored via script and send an email to an admin if the voltage is over or below a certain value ? i don't have much of a clue about scripting, thats why i am asking.

regards
Jan
 
User avatar
airstream
Member Candidate
Member Candidate
Posts: 188
Joined: Fri Feb 03, 2006 6:33 am
Location: New Zealand

Re: RB333 voltage monitoring -> alarm email

Tue Apr 01, 2008 10:38 am

This is an excellent question, can RouterOS give us the data of input volts on RB's WRAP's etc?
Keep tryin' its bound to work!!
-----
-----
ROOT@COSMOS> Reality.sys corrupted -- Reboot Universe (Y/N)?
>_
 
ekkas
Long time Member
Long time Member
Posts: 562
Joined: Mon Sep 26, 2005 1:01 pm
Location: South Africa

Re: RB333 voltage monitoring -> alarm email

Sat Apr 12, 2008 1:37 am

RB333 shows voltage, but RB532(& A) always show 0v. I think only RB112 can show temp as well.
 
User avatar
jordantrx
Long time Member
Long time Member
Posts: 505
Joined: Tue Oct 23, 2007 8:58 pm
Location: WAY upstate NY

Re: RB333 voltage monitoring -> alarm email

Sun Apr 13, 2008 9:56 pm

RB333 shows voltage, but RB532(& A) always show 0v. I think only RB112 can show temp as well.
Well if you Run an RB33 And it can monitor the voltage, Yes i do beleive that you can make a script and send it in the e-mail letting you know you only have like 25 % of a battery left. Or whatever percent you wish... Im not sure if i could make the script but maybe MRZ can.. Im just pretty sure it is possible, as long as you can go into your terminal and do a /print and get the Percentage you should beable to send that prinout in an e-mail. You just have to configure the script correctly... -Jordan
~Agricultural WISP "ZONE"~ Beware of oncoming cattle and dont hit the farmer!!! I need to ask him about using his silo for an AP first"~

*Automated Billing Installer* http://wiki.mikrotik.com/wiki/AutomatedBilling Built by Krige ;-)
 
User avatar
airstream
Member Candidate
Member Candidate
Posts: 188
Joined: Fri Feb 03, 2006 6:33 am
Location: New Zealand

Re: RB333 voltage monitoring -> alarm email

Sun Apr 13, 2008 11:31 pm

RB333 shows voltage, but RB532(& A) always show 0v. I think only RB112 can show temp as well.
Where does the RB333 show this information?
Keep tryin' its bound to work!!
-----
-----
ROOT@COSMOS> Reality.sys corrupted -- Reboot Universe (Y/N)?
>_
 
User avatar
jordantrx
Long time Member
Long time Member
Posts: 505
Joined: Tue Oct 23, 2007 8:58 pm
Location: WAY upstate NY

Re: RB333 voltage monitoring -> alarm email

Mon Apr 14, 2008 2:19 am

I believe you have to have a Power Backup unit hooked up, and the serial cable connected to the routerboard for you to get this Information. If you look in the manual it has something about these, It is on the very bottom. You have to have that certain package and everything right, and you can monitor your Backup power source Percentage of battery left.. May be wrong. Its just what i heard. -Jordan
~Agricultural WISP "ZONE"~ Beware of oncoming cattle and dont hit the farmer!!! I need to ask him about using his silo for an AP first"~

*Automated Billing Installer* http://wiki.mikrotik.com/wiki/AutomatedBilling Built by Krige ;-)
 
fosben
Frequent Visitor
Frequent Visitor
Posts: 81
Joined: Thu Dec 14, 2006 4:50 pm

Re: RB333 voltage monitoring -> alarm email

Tue Apr 15, 2008 12:06 pm

RB333 shows voltage, but RB532(& A) always show 0v. I think only RB112 can show temp as well.
Where does the RB333 show this information?
/system health print
 
fosben
Frequent Visitor
Frequent Visitor
Posts: 81
Joined: Thu Dec 14, 2006 4:50 pm

Re: RB333 voltage monitoring -> alarm email

Tue Apr 15, 2008 12:38 pm

Maybe this solve it for you ?
/system health
:if ([get voltage]<200) do={/tool e-mail send to="abc@abc.no" subject="low voltage" from="333 board x"} else {:log info "voltage ok"}
This scripts sends a warning if the volt drops under 20 (200 value)

-email server must be set before script runs
 
User avatar
jordantrx
Long time Member
Long time Member
Posts: 505
Joined: Tue Oct 23, 2007 8:58 pm
Location: WAY upstate NY

Re: RB333 voltage monitoring -> alarm email

Tue Apr 15, 2008 3:42 pm

Maybe this solve it for you ?
/system health
:if ([get voltage]<200) do={/tool e-mail send to="abc@abc.no" subject="low voltage" from="333 board x"} else {:log info "voltage ok"}
This scripts sends a warning if the volt drops under 20 (200 value)

-email server must be set before script runs
Told you it was possible. 8) I beleive you have to have a set: server or set [resolve] to direct to the smtp server or e-mail server.... -Jordan
~Agricultural WISP "ZONE"~ Beware of oncoming cattle and dont hit the farmer!!! I need to ask him about using his silo for an AP first"~

*Automated Billing Installer* http://wiki.mikrotik.com/wiki/AutomatedBilling Built by Krige ;-)
 
fosben
Frequent Visitor
Frequent Visitor
Posts: 81
Joined: Thu Dec 14, 2006 4:50 pm

Re: RB333 voltage monitoring -> alarm email

Tue Apr 15, 2008 5:49 pm

Yeah I changed it a bit to make it abit better:

/system health
:if ([get voltage]<200) do={/tool e-mail send server=x.x.x.x to=your@email.no subject=[/system identity get name] from="routerboard" body=("Low voltage. Current voltage is :".[/system health get voltage])} else {:log info "Voltage is ok."}

where x.x.x.x = ip to your smtp server.

Then just make a scheduler to run the script whenever you want it to.. You could do /10 to after get voltage, but then it will be shown without decimals. ie it would say 19 even if voltage was 19.9. The from email address may be changed to match you to address
 
snoozer
Member Candidate
Member Candidate
Topic Author
Posts: 154
Joined: Mon Jun 18, 2007 5:13 pm
Location: Schull, West-Cork, Ireland.

Re: RB333 voltage monitoring -> alarm email

Tue Jun 24, 2008 4:39 pm

that email script is cool. i have realized the whole thing in a different way. i have nagios polling the voltage via snmp and give an alarm via email and sms if the voltage is out of normal values. that work fine for me.

Jan
 
meno
Member Candidate
Member Candidate
Posts: 233
Joined: Sat Jul 19, 2008 4:45 am

Re: RB333 voltage monitoring -> alarm email

Mon Jul 21, 2008 5:13 pm

that email script is cool. i have realized the whole thing in a different way. i have nagios polling the voltage via snmp and give an alarm via email and sms if the voltage is out of normal values. that work fine for me.

Jan

Hi snoozer, can u share the script?
 
rickashe
just joined
Posts: 17
Joined: Tue Oct 18, 2005 4:39 pm
Location: Dublin, Ireland

Re: RB333 voltage monitoring -> alarm email

Wed Mar 25, 2009 12:25 pm

When I implement this script and run it I keep getting an error message in the log:

system e-mail error - Error sending e-mail: abnormal termination (timeout)

The script I am using is:

/system health
:if ([get voltage]<110) do={/tool e-mail send server=x.x.x.x to=winbox@myisp.com subject=[/system identity get name] from="myRB@myisp.com" body=("Low voltage. Current voltage is :".[/system health get voltage])} else {:log info "Voltage is ok."}

I want the board to let me know if power drops below 11V, I am running it on an alternative energy site with 12V batteries.

It is not an error with the mail server as I alreday have the box mailing me a backup file once a week, also it is an RB433 rather then an RB333 which the script was originally written for but I wouldn't have thought that would make a difference.

Can anyone see what I am doing wrong????

(I do actually have my mail server address in in place of the x.x.x.x but don't really want to post its address!)

Thanks
 
SurferTim
Forum Guru
Forum Guru
Posts: 4637
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: RB333 voltage monitoring -> alarm email

Wed Mar 25, 2009 6:00 pm

Sounds like the timeout is the email server not responding.

BTW, here is my script in the wiki:
http://wiki.mikrotik.com/wiki/Monitor_i ... B333/433AH
You might be able to use parts of it.
 
RobClem
Frequent Visitor
Frequent Visitor
Posts: 50
Joined: Wed Jun 09, 2004 12:45 pm
Contact:

Re: RB333 voltage monitoring -> alarm email

Tue Nov 10, 2009 10:32 pm

Can anyone tell me how to run a voltage monitor script and send the output to a readable file or to the mikrotik logs. The reason is I cannot get the clients email to work from this radio.

thanks

Rob
 
SurferTim
Forum Guru
Forum Guru
Posts: 4637
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: RB333 voltage monitoring -> alarm email

Wed Nov 11, 2009 12:14 am

Your ISP should have an email "smart host" that will relay email from their ip set. Call and ask. I have one. So does Cox Communications (one of my providers). Use that as your email server in the setup in the MikroTik box. Then your email should go out ok.
 
RobClem
Frequent Visitor
Frequent Visitor
Posts: 50
Joined: Wed Jun 09, 2004 12:45 pm
Contact:

Re: RB333 voltage monitoring -> alarm email

Wed Nov 11, 2009 10:55 am

its more to do with the customers network and me not having control to sort this out. I just need a command to run on their RB433 that will show the voltage input to the board in either a log or on the screen when I run the command manually.

ta

Rob
 
SurferTim
Forum Guru
Forum Guru
Posts: 4637
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: RB333 voltage monitoring -> alarm email

Wed Nov 11, 2009 11:29 am

You can save this script as "voltlog", then schedule it to run every hour. Puts the voltage in the log instead of email. Only works with RB units that have voltage monitor (RB333, RB433AH, etc.).
:global voltage [/system health get voltage]
:local emessage ("Voltage is " . [:pick $voltage 0 2] . "." . [:pick $voltage 2 3])
:log info $emessage
 
RobClem
Frequent Visitor
Frequent Visitor
Posts: 50
Joined: Wed Jun 09, 2004 12:45 pm
Contact:

Re: RB333 voltage monitoring -> alarm email

Thu Nov 12, 2009 7:06 pm

Is there a script that will get the voltage from an RB433 as this script does not give a value.

thanks

Rob
 
SurferTim
Forum Guru
Forum Guru
Posts: 4637
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: RB333 voltage monitoring -> alarm email

Thu Nov 12, 2009 7:28 pm

The RB433 does not have voltage monitor. :(

I have asked repeatedly for this feature in the 433. Maybe RouterBoard does not realize how many challenges are caused by bad power. This feature makes it SO EASY to troubleshoot these problems that others blame on the hardware/OS.

PS: Are you reading this normis?
 
User avatar
airstream
Member Candidate
Member Candidate
Posts: 188
Joined: Fri Feb 03, 2006 6:33 am
Location: New Zealand

Re: RB333 voltage monitoring -> alarm email

Thu Nov 12, 2009 9:46 pm

The RB433 does not have voltage monitor. :(

I have asked repeatedly for this feature in the 433. Maybe RouterBoard does not realize how many challenges are caused by bad power. This feature makes it SO EASY to troubleshoot these problems that others blame on the hardware/OS.

PS: Are you reading this normis?
Completely agree, Voltage monitor is a very useful tool when troubleshooting remote broadcast towers. We use the RB333's in places driven by solar/wind hybrid setups and have the dude graph the voltage at all these places. Generally we know about a power fault before the tower goes down thanks to this feature on some boards. It would be good if all future RB's had this feature as standard.
Keep tryin' its bound to work!!
-----
-----
ROOT@COSMOS> Reality.sys corrupted -- Reboot Universe (Y/N)?
>_

Who is online

Users browsing this forum: zerospace and 14 guests