SMS as server infos
Hi,
did anybody configured a kind of software for getting information about the server status (raid, disk space, etc.) thru SMS on a mobile phone? If so, could you tell me which software have you used and how you configured it (or where I can find some information)?
Thanks,
Luca
Signature · 2 lines
Luca Ferrari, [email protected]
Quoted 5 lines · Luca Ferrari
Hi,
did anybody configured a kind of software for getting information about the server status (raid, disk space, etc.) thru SMS on a mobile phone? If so, could you tell me which software have you used and how you configured it (or where I can find some information)?
If you're competent with shell and Python (or, yuck, perl ;-)) you can instrument this pretty easily. All the info you want is either a command or a cat of some /proc file away, and with Python you can easily build a HTTP POST to pop off to your SMS gateway. How fancy you want to get in between is up to you.
I haven't done exactly this, but some very similar things before.
CD
Quoted 10 lines · Chris DiTrani
If you're competent with shell and Python (or, yuck, perl ;-)) you can instrument this pretty easily. All the info you want is either a command or a cat of some /proc file away, and with Python you can easily build a HTTP POST to pop off to your SMS gateway. How fancy you want to get in between is up to you.
I haven't done exactly this, but some very similar things before.
Hmm.... This sounds really interesting, Though I have no idea what is going on.
could you please direct me to some resources on this "HTTP POST to pop off to your SMS gateway" business?
I must say though that I DON'T know anything 'bout this, so a tutorial kind of site would be rather helpful.
regards,
Joy.M.M
Quoted 9 lines
CD
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Most cell phone carriers have websites where you can go and SMS one of their subscribers for free. Often called "Internet Chat" or "Web-2-SMS" or something similar.
Using a HTTP POST means you put together something that will go to that particular site and do a HTTP POST (same as you typing something into some fields on a web page and clicking "send" or "submit" on the page) to send a line of text or a message to your particular number.
Sorry I dont have a full howto for you.
-Ahsan
Quoted 41 lines · joy
Quoted 10 lines · Chris DiTrani
If you're competent with shell and Python (or, yuck, perl ;-)) you can instrument this pretty easily. All the info you want is either a command or a cat of some /proc file away, and with Python you can easily build a HTTP POST to pop off to your SMS gateway. How fancy you want to get in between is up to you.
I haven't done exactly this, but some very similar things before.
Hmm.... This sounds really interesting, Though I have no idea what is going on.
could you please direct me to some resources on this "HTTP POST to pop off to your SMS gateway"
business?
I must say though that I DON'T know anything 'bout this, so a tutorial kind of site would be rather helpful.regards,
Joy.M.MQuoted 9 lines
CD
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 9 lines · Ahsan Ali
Most cell phone carriers have websites where you can go and SMS one of their subscribers for free. Often called "Internet Chat" or "Web-2-SMS" or something similar.
Using a HTTP POST means you put together something that will go to that particular site and do a HTTP POST (same as you typing something into some fields on a web page and clicking "send" or "submit" on the page) to send a line of text or a message to your particular number.
Yes. If you find your cell provider's web portal to sms (my provers:
http://www.mymmode.com/messagecenter/), either by looking at the source html or worst case sniffing the packet when submitting the form you can figure out what the data posted to the server looks like and emulate that from a script (probably 1/2 dozen lines of Python code). This approach is a hack since it's depending on a private interface (the format of the posted data and url itself) that can be changed at any time (i.e. you wouldn't want to build a critical notification system around it), so substituting a real sms api or toolset for the post to your cell provider would probably be better. Using a already available package that wraps all this up would be better still, but I don't have any experience with that.
CD
Quoted 28 lines · Chris DiTrani
Quoted 11 lines · Ahsan Ali
Most cell phone carriers have websites where you can go and SMS one of their subscribers for free. Often called "Internet Chat" or "Web-2-SMS" or something similar.
Using a HTTP POST means you put together something that will go to that particular site and do a HTTP POST (same as you typing something into some fields on a web page and clicking "send" or "submit" on the page) to send a line of text or a message to your particular number.
Yes. If you find your cell provider's web portal to sms (my provers:
http://www.mymmode.com/messagecenter/), either by looking at the source html or worst case sniffing the packet when submitting the form you can figure out what the data posted to the server looks like and emulate that from a script (probably 1/2 dozen lines of Python code). This approach is a hack since it's depending on a private interface (the format of the posted data and url itself) that can be changed at any time (i.e. you wouldn't want to build a critical notification system around it), so substituting a real sms api or toolset for the post to your cell provider would probably be better. Using a already available package that wraps all this up would be better still, but I don't have any experience with that.
Quoted 3 lines
CD
Yes,I think I get the general idea.... will do some more research and see whether it can be my next pastime (NO, I'm not a geek!).
Thanx,
Joy.M.M
Quoted 7 lines
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
You can use a monitoring system like Nagios (http://www.nagios.org) to check your systems. It's possible to let it alert with mails, icq-messages and so one...
With mails, you can look for an free-email-provide, who supports to send you the subject of the mail within a SMS to your phone.
Or you invest some money into a sms gateway (like that one from nokia:
http://www.nokia.com/nokia/0,6771,55866,00.html) which are not very expensive and works with linux sms tools like
smstools - http://www.isis.de/members/~s.frings/smstools/
gsmlib - http://www.pxh.de/fs/gsmlib/
andi
Am Mit, den 23.06.2004 schrieb Luca Ferrari um 18:41:
Quoted 8 lines
Hi,
did anybody configured a kind of software for getting information about the server status (raid, disk space, etc.) thru SMS on a mobile phone? If so, could you tell me which software have you used and how you configured it (or where I can find some information)?Thanks,
Luca
Quoted 6 lines · Luca Ferrari
Hi,
did anybody configured a kind of software for getting information about the server status (raid, disk space, etc.) thru SMS on a mobile phone? If so, could you tell me which software have you used and how you configured it (or where I can find some information)?Thanks,
Luca
Hi,
I hope this reply is not too late... But anyway, here is the solution. (all this is short description, but anyway you have to use /dev/brain ;)
Components:
1 Nokia's DLR-3P Cable
1 Nokia 6110i Cell Phone
1 PC with serial port + Linux
Instructions:
Connect everything as needed, and go to: www.mwiacek.com Download latest gammu from there, compile and install.
Read gammu's docs on how to setup it with --smsd option
Install Nagios (if you want) or make any other simple monitoring script.
Create cgi like this (it's simple and possible buggy - but does his work):
----------------------------
#!/usr/local/bin/perl -w
use CGI;
sub clear_it($) {
my $var = shift;
if ($var =~ /[^0-9\+]/g) {
print "<SCRIPT LANGUAGE=\"javascript\">alert('Illegal number entered!'); history.back();</script>";
} else {
return $var;
}
}$q = new CGI;
my $to = $q->param('to');
my $msg = $q->param('msg');
my $val = $q->param('validity');
print $q->header(-type => 'text/html',
-cost => 'Three smackers',
-annoyance_level => 'high',
-complaints_to => '[email protected]',
-destination => "$to");
$to = &clear_it($to);
# SET THESE TO REFLECT YOUR PATHS
$inbox = "/var/spool/sms/inbox";
$outbox = "/var/spool/sms/outbox";
$sent = "/var/spool/sms/sent";
$error = "/var/spool/sms/error";
$tmp = "/tmp/OUTA_\+".$to."_$$.txt";
print $q->start_html('Simple Script');
print $q->hr; print "Got: $to $msg $val -> $tmp"; print $q->br; print $q->hr; print $q->end_html;
if (! -z $msg) {
open (MESS, ">$tmp") || die("Can\'t open $tmp: $?"); print MESS "$msg";
close MESS;mv $tmp $outbox;
}
--------------------
put it in cgi-bin dir on SAME PC where gammu installed and running.
then...
try this from linux cmd line:
/usr/bin/curl -s -S SMS_SCRIPT_URL -d "to=<your_cell_number>&msg=message_you_want_to_send&validity=max"
or
just create file with content you want to send in /var/spool/sms/outbox in form of:
OUTA_+COUNTRYCELLPHONENUMBER_PRIORITY.txt
( Example: echo "Hehe, it worked" > /var/spool/sms/outbox/OUTA_+97254xxxxxx_01.txt )
and it will be sent asap.
Wait for your sms to arrive ;)
Hope that helps.
Best Regards,
ASA