linux-admin.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* SMS as server infos
@ 2004-06-23 16:41 Luca Ferrari
  2004-06-23 17:12 ` Chris DiTrani
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Luca Ferrari @ 2004-06-23 16:41 UTC (permalink / raw)
  To: linux-admin

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

-- 
Luca Ferrari,
fluca1978@virgilio.it

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: SMS as server infos
  2004-06-23 16:41 SMS as server infos Luca Ferrari
@ 2004-06-23 17:12 ` Chris DiTrani
  2004-06-24 11:15   ` joy
  2004-06-24  4:58 ` Andreas Unterkircher
  2004-07-27  8:24 ` Ag. System Administrator
  2 siblings, 1 reply; 8+ messages in thread
From: Chris DiTrani @ 2004-06-23 17:12 UTC (permalink / raw)
  To: linux-admin

On Wed, 2004-06-23 at 12:41, Luca Ferrari wrote:
> 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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: SMS as server infos
  2004-06-23 16:41 SMS as server infos Luca Ferrari
  2004-06-23 17:12 ` Chris DiTrani
@ 2004-06-24  4:58 ` Andreas Unterkircher
  2004-07-27  8:24 ` Ag. System Administrator
  2 siblings, 0 replies; 8+ messages in thread
From: Andreas Unterkircher @ 2004-06-24  4:58 UTC (permalink / raw)
  To: fluca1978; +Cc: linux-admin

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:
> 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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: SMS as server infos
  2004-06-23 17:12 ` Chris DiTrani
@ 2004-06-24 11:15   ` joy
  2004-06-24 12:56     ` Ahsan Ali
  0 siblings, 1 reply; 8+ messages in thread
From: joy @ 2004-06-24 11:15 UTC (permalink / raw)
  To: Chris DiTrani; +Cc: linux-admin

Chris DiTrani wrote:

>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

>CD
>
>-
>To unsubscribe from this list: send the line "unsubscribe linux-admin" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>  
>


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: SMS as server infos
  2004-06-24 11:15   ` joy
@ 2004-06-24 12:56     ` Ahsan Ali
  2004-06-24 13:30       ` Chris DiTrani
  0 siblings, 1 reply; 8+ messages in thread
From: Ahsan Ali @ 2004-06-24 12:56 UTC (permalink / raw)
  To: gracecott; +Cc: Chris DiTrani, linux-admin

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

On Thu, 24 Jun 2004 16:45:05 +0530, joy <gracecott@sancharnet.in> wrote:
> 
> Chris DiTrani wrote:
> 
> >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
> 
> 
> 
> >CD
> >
> >-
> >To unsubscribe from this list: send the line "unsubscribe linux-admin" in
> >the body of a message to majordomo@vger.kernel.org
> >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 majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: SMS as server infos
  2004-06-24 12:56     ` Ahsan Ali
@ 2004-06-24 13:30       ` Chris DiTrani
  2004-06-25 12:35         ` joy
  0 siblings, 1 reply; 8+ messages in thread
From: Chris DiTrani @ 2004-06-24 13:30 UTC (permalink / raw)
  To: linux-admin

On Thu, 2004-06-24 at 08:56, Ahsan Ali wrote:
> 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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: SMS as server infos
  2004-06-24 13:30       ` Chris DiTrani
@ 2004-06-25 12:35         ` joy
  0 siblings, 0 replies; 8+ messages in thread
From: joy @ 2004-06-25 12:35 UTC (permalink / raw)
  To: linux-admin

Chris DiTrani wrote:

>On Thu, 2004-06-24 at 08:56, Ahsan Ali wrote:
>  
>
>>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
>  
>
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

>-
>To unsubscribe from this list: send the line "unsubscribe linux-admin" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>  
>


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: SMS as server infos
  2004-06-23 16:41 SMS as server infos Luca Ferrari
  2004-06-23 17:12 ` Chris DiTrani
  2004-06-24  4:58 ` Andreas Unterkircher
@ 2004-07-27  8:24 ` Ag. System Administrator
  2 siblings, 0 replies; 8+ messages in thread
From: Ag. System Administrator @ 2004-07-27  8:24 UTC (permalink / raw)
  To: linux-admin

Luca Ferrari wrote:
> 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   => 'some@email.domain.com',
                    -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


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2004-07-27  8:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-23 16:41 SMS as server infos Luca Ferrari
2004-06-23 17:12 ` Chris DiTrani
2004-06-24 11:15   ` joy
2004-06-24 12:56     ` Ahsan Ali
2004-06-24 13:30       ` Chris DiTrani
2004-06-25 12:35         ` joy
2004-06-24  4:58 ` Andreas Unterkircher
2004-07-27  8:24 ` Ag. System Administrator

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).