Page 1 of 1

RB333 voltage monitoring -> alarm email

Posted: Sat Mar 15, 2008 10:38 am
by snoozer
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

Re: RB333 voltage monitoring -> alarm email

Posted: Tue Apr 01, 2008 10:38 am
by airstream
This is an excellent question, can RouterOS give us the data of input volts on RB's WRAP's etc?

Re: RB333 voltage monitoring -> alarm email

Posted: Sat Apr 12, 2008 1:37 am
by ekkas
RB333 shows voltage, but RB532(& A) always show 0v. I think only RB112 can show temp as well.

Re: RB333 voltage monitoring -> alarm email

Posted: Sun Apr 13, 2008 9:56 pm
by jordantrx
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

Re: RB333 voltage monitoring -> alarm email

Posted: Sun Apr 13, 2008 11:31 pm
by airstream
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?

Re: RB333 voltage monitoring -> alarm email

Posted: Mon Apr 14, 2008 2:19 am
by jordantrx
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

Re: RB333 voltage monitoring -> alarm email

Posted: Tue Apr 15, 2008 12:06 pm
by fosben
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

Re: RB333 voltage monitoring -> alarm email

Posted: Tue Apr 15, 2008 12:38 pm
by fosben
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

Re: RB333 voltage monitoring -> alarm email

Posted: Tue Apr 15, 2008 3:42 pm
by jordantrx
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

Re: RB333 voltage monitoring -> alarm email

Posted: Tue Apr 15, 2008 5:49 pm
by fosben
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

Re: RB333 voltage monitoring -> alarm email

Posted: Tue Jun 24, 2008 4:39 pm
by snoozer
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

Re: RB333 voltage monitoring -> alarm email

Posted: Mon Jul 21, 2008 5:13 pm
by meno
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?

Re: RB333 voltage monitoring -> alarm email

Posted: Wed Mar 25, 2009 12:25 pm
by rickashe
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

Re: RB333 voltage monitoring -> alarm email

Posted: Wed Mar 25, 2009 6:00 pm
by SurferTim
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.

Re: RB333 voltage monitoring -> alarm email

Posted: Tue Nov 10, 2009 10:32 pm
by RobClem
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

Re: RB333 voltage monitoring -> alarm email

Posted: Wed Nov 11, 2009 12:14 am
by SurferTim
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.

Re: RB333 voltage monitoring -> alarm email

Posted: Wed Nov 11, 2009 10:55 am
by RobClem
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

Re: RB333 voltage monitoring -> alarm email

Posted: Wed Nov 11, 2009 11:29 am
by SurferTim
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

Re: RB333 voltage monitoring -> alarm email

Posted: Thu Nov 12, 2009 7:06 pm
by RobClem
Is there a script that will get the voltage from an RB433 as this script does not give a value.

thanks

Rob

Re: RB333 voltage monitoring -> alarm email

Posted: Thu Nov 12, 2009 7:28 pm
by SurferTim
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?

Re: RB333 voltage monitoring -> alarm email

Posted: Thu Nov 12, 2009 9:46 pm
by airstream
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.