Community discussions

MikroTik App
 
punn
newbie
Topic Author
Posts: 34
Joined: Sun Jun 14, 2009 4:48 pm
Location: Prague

Notification from The Dude server via telnet

Sun Aug 08, 2010 2:03 pm

Hi!

I've read a lot recently about sms notifications from The Dude.
I'm planning to implement something similar, but witout a third party software.
The e-mail to sms is not an option, because what if our smtp server does down ?!

Recently tested a 3G modem in a RB433UAH. Succesfully connects to internet and sends sms.
I'd like to use this as a notification device.

The modem will be connected to our main router, where is the vpn server.
I'd like to set a notification in The Dude, which will be executed on the server(Windows Server 2008 or on a mikrotik where the dude packge is installed). It would connect via telnet to the router where the usb modem is connected. Then send a comannd to the router to send the sms.

Something like this:
telnet admin@192.168.1.1
#???
tool sms send port=usb2 dst="xxxxxxxx" message="Service [Probe.Name] on [Device.Name] is now [Service.Status] ([Service.ProblemDescription])"
Could you pls help me to make this notification work?!
I guess it would be helpful also for others!

Thank you!

Best regards
Gábor
Prague
 
User avatar
gsandul
Member Candidate
Member Candidate
Posts: 154
Joined: Mon Oct 19, 2009 1:42 pm

Re: Notification from The Dude server via telnet

Wed Aug 11, 2010 11:36 am

Hello, Gábor.
Due to telnet protocol limitation it is not possible to specify login/password. You can do it only using some script which will fill password after password prompt, as for me, I would use perl for it.
Alternatively you can do it if there is ssh access to your device. In a such a case you can use tools like
plink http://the.earth.li/~sgtatham/putty/0.5 ... pter7.html which is companion utility of the well known putty
Using plink you can create custom notification which will run commands on your RB433UAH (if it supports ssh).