
06-26-2011, 03:33 AM
|
|
Premium Member
|
|
Join Date: Apr 2000
Location: Brisbane, Australia
Posts: 1,079
|
|
What's required to send SMS text messages from linux sever ?
I'm writing an all in one mysql and data backup script which merges various tools together i.e. mysqldump, rsync, percona xtrabackup and mydumper backup tools. Currently, it sends backup sucess/failure notifications via email from shell.
Then it got me thinking, what about sending notifications via SMS text message ? But I have no idea what is needed on the server end to do this ? Would it be possible to do this even on remote linux servers where I only have ssh2/root access ?
__________________
:: vB benchmarks = Litespeed Cache 721x times faster than Apache
:: MySQL benchmarks (MariaDB 5.2 Intel Opt >MariaDB 5.2 >Percona 5.5 >MySQL 5.5)
:: MySQL backup/restore = mydumper > mysqldump
:: CentminMod.com = Nginx Menu Installer (ngx_pagespeed + SPDY supported)
|

06-26-2011, 03:56 AM
|
|
Rebooting is a hack, not a fix
|
|
Join Date: May 2008
Location: Citrus Heights, CA
Posts: 1,554
|
|
I would recommend using a service like Twilio;
http://www.twilio.com
Or for personal use, Google Voice has a decent API for sending texts.
__________________
Best Regards,
Mark
|

06-26-2011, 06:50 AM
|
|
Premium Member
|
|
Join Date: Apr 2000
Location: Brisbane, Australia
Posts: 1,079
|
|
Thanks Mark will look into it, seems to have some nice features too 
__________________
:: vB benchmarks = Litespeed Cache 721x times faster than Apache
:: MySQL benchmarks (MariaDB 5.2 Intel Opt >MariaDB 5.2 >Percona 5.5 >MySQL 5.5)
:: MySQL backup/restore = mydumper > mysqldump
:: CentminMod.com = Nginx Menu Installer (ngx_pagespeed + SPDY supported)
|

06-26-2011, 05:16 PM
|
|
Web Hosting Master
|
|
Join Date: Apr 2002
Location: Auckland - New Zealand
Posts: 1,573
|
|
I've used gnokii http://www.gnokii.org/ in the past on linux boxes and a symbian mobile phone plugged into it. Coupled with apache/nagios and a soap server (for remote hosts to send sms), made a great cheap sms gateway
On mates rates plan with vodafone (technically wasn't supposed to do that, automate sms on that plan but there you go  )
|

06-26-2011, 10:42 PM
|
|
WHT Addict
|
|
Join Date: Mar 2010
Posts: 105
|
|
Quote:
Originally Posted by eva2000
I'm writing an all in one mysql and data backup script which merges various tools together i.e. mysqldump, rsync, percona xtrabackup and mydumper backup tools. Currently, it sends backup sucess/failure notifications via email from shell.
Then it got me thinking, what about sending notifications via SMS text message ? But I have no idea what is needed on the server end to do this ? Would it be possible to do this even on remote linux servers where I only have ssh2/root access ?
|
Since you're already sending email notifications out, the *easiest* way would be to check with your cell provider and see if they have an email-to-SMS gateway. Most of them do, and then it's just a matter of changing where the emails are sent.
|

06-26-2011, 11:52 PM
|
|
Vroom
|
|
Join Date: Jul 2007
Location: Ashburn, VA
Posts: 1,249
|
|
Quote:
Originally Posted by Senator B
Since you're already sending email notifications out, the *easiest* way would be to check with your cell provider and see if they have an email-to-SMS gateway. Most of them do, and then it's just a matter of changing where the emails are sent.
|
http://en.wikipedia.org/wiki/List_of_SMS_gateways
__________________
Preetam Jinka
Isomerous - High performance web services for business and individuals.
Bitcable KVMs, cPanel hosting, Oracle expertise, and more.
|

06-27-2011, 04:54 AM
|
|
Aspiring Evangelist
|
|
Join Date: May 2004
Posts: 350
|
|
You can also use a service such as this one.
There are other similar (and cheaper) services out there, but the names escape me at the moment.
|

06-27-2011, 06:41 AM
|
|
Premium Member
|
|
Join Date: Apr 2000
Location: Brisbane, Australia
Posts: 1,079
|
|
thanks guys so much useful info, lots of reading to do 
__________________
:: vB benchmarks = Litespeed Cache 721x times faster than Apache
:: MySQL benchmarks (MariaDB 5.2 Intel Opt >MariaDB 5.2 >Percona 5.5 >MySQL 5.5)
:: MySQL backup/restore = mydumper > mysqldump
:: CentminMod.com = Nginx Menu Installer (ngx_pagespeed + SPDY supported)
|

06-27-2011, 06:44 AM
|
|
Junior Guru Wannabe
|
|
Join Date: Nov 2005
Posts: 51
|
|
Skype has an API too, if you don't mind paying to send messages.
__________________
Adam McMaster
Valcato Hosting — Over nine years of great service
Shared, VPS and dedicated servers.
|

06-27-2011, 10:14 AM
|
|
Russ
|
|
Join Date: Mar 2002
Location: Philadelphia, PA
Posts: 2,496
|
|
I have written a bash script that will send text, pm, ill send you the source.
|

06-27-2011, 01:45 PM
|
|
WHT Addict
|
|
Join Date: Jan 2010
Location: Okemos, MI
Posts: 102
|
|
I've done it before with: http://code.google.com/p/pygooglevoice/
You'll need a Google Voice account, but it worked well.
Just needed a simple command like:
pygooglevoice --batch send_sms 8887776666 Hello World!
|

06-27-2011, 03:48 PM
|
|
Russ
|
|
Join Date: Mar 2002
Location: Philadelphia, PA
Posts: 2,496
|
|
Just modify the text etc, used this in a monitoring bash script I put together [simpleMon]. Obviously not the best method, but it functioned as intended.
Code:
# Built in SMS function (makes request call to: http://www.google.com/sendtophone)
# Your Carrier supports: verizon, tmobile, att, alltel, sprint
SMS_CARRIER="att"
# Your ten digit phone number (i.e: 5556667777)
SMS_NUMBER=""
# SMS Subject & Message the $HOST variable will return the affected domain/IP.
SMS_SUB="down"
SMS_MSG="not_responding"
SMS_CARRIER=$(echo $SMS_CARRIER | awk '{print toupper($0)}')
post_request="gl=US&hl=en&client=navclient-ffsms&text=simpleMon&from=&c=1&mobile_user_id=$SMS_NUMBER&carrier=$SMS_CARRIER&ec=on&subject=$SMS_SUB&text=$SMS_MSG&send_button=Send"
post_addr='http://www.google.com/sendtophone'
ret="$(wget -qO- --post-data "$post_request" "$post_addr")"
|

06-27-2011, 03:53 PM
|
|
Junior Guru Wannabe
|
|
Join Date: Jun 2011
Posts: 59
|
|
Quote:
Originally Posted by Bitcable
|
+1
I just email to 2065551212@vtext.com and bingo: SMS arrives. . .
;-)
|

06-28-2011, 12:27 PM
|
|
Premium Member
|
|
Join Date: Apr 2000
Location: Brisbane, Australia
Posts: 1,079
|
|
sweet more gem info
thanks viGeek for the sample code too 
__________________
:: vB benchmarks = Litespeed Cache 721x times faster than Apache
:: MySQL benchmarks (MariaDB 5.2 Intel Opt >MariaDB 5.2 >Percona 5.5 >MySQL 5.5)
:: MySQL backup/restore = mydumper > mysqldump
:: CentminMod.com = Nginx Menu Installer (ngx_pagespeed + SPDY supported)
|

06-28-2011, 09:43 PM
|
|
Vroom
|
|
Join Date: Jul 2007
Location: Ashburn, VA
Posts: 1,249
|
|
Quote:
Originally Posted by WholesaleBackup
|
I suggest you remove your phone number from a public forum 
__________________
Preetam Jinka
Isomerous - High performance web services for business and individuals.
Bitcable KVMs, cPanel hosting, Oracle expertise, and more.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
| Postbit Selector |
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|
| Login: |
|
|
| Advertisement: |
|
|
| Web Hosting News: |
|
|
|