Re: ping/page script

2000-07-24 Thread Jon Gardner

on 7/24/2000 6:25 AM, Ken Gillett at [EMAIL PROTECTED] wrote:

> Does it send the email all by itself or does it simply control an
> email application such as Eudora?
> 

It writes a text file (with appropriate SMTP headers) into the SIMS outgoing
mail folder, and SIMS sends it out.

<><
Jon L. Gardner '89, Computer Systems Manager 
Texas A&M University Dept. of Food Services 
Tel 979.458.1839 * Fax 979.845.2157 * Hip 979.229.4323
PGP public key available at 





--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Archives:
Problems?:   [EMAIL PROTECTED]




Re: ping/page script

2000-07-24 Thread Ken Gillett

At 3:08 PM -0500 21/7/00, Jon Gardner wrote:
>
>>  After searching long and hard for a Mac OS based App which would:
>>
>>  A-generate an ICMP ping
>>  B-was AppleScriptable
>>  C-cost less that $20
>>
>>  I gave up. Doesn't mean it doesn't exist, just that I couldn't find it after
>>  several weeks of on and off searching. So, I resorted to Unix and hacked up
>
>I wrote an AppleScript-based solution that fits your bill. It incorporates
>several different freeware/shareware programs, can send email, dial a pager,
>make noise, etc. It's called "The Pinger" and is available on my public
>iDisk, username jlg.


Does it send the email all by itself or does it simply control an 
email application such as Eudora?



-- 



Ken  G i l l e t t
---


--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Archives:
Problems?:   [EMAIL PROTECTED]




Re: ping/page script

2000-07-21 Thread Jon Gardner

on 7/21/2000 4:26 PM, Dan Willson at [EMAIL PROTECTED] wrote:

> Head this way and check out Christian Vick's iDisk Mounter v1.7:
> ftp://io.com/%2Fpub/usr/gregg0/scripts/iDiskMounter1.7.hqx

Nope, iDisk Mounter only works with your own iDisk...it won't mount public
iDisks. If anyone wants a copy of The Pinger, email me off-list and I'll
send it to you.

<><
Jon L. Gardner '89, Computer Systems Manager 
Texas A&M University Dept. of Food Services 
Tel 979.458.1839 * Fax 979.845.2157 * Hip 979.229.4323
PGP public key available at 





--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Archives:
Problems?:   [EMAIL PROTECTED]




RE: ping/page script

2000-07-21 Thread Dan Willson

> Stefan Jeglinski asked this question about Jon Gardner's "The Pinger"
> utility (which lives on iDisk "jlg"):

> For those of us who are stubborn and still use 8.6, how do we get to this?


Head this way and check out Christian Vick's iDisk Mounter v1.7:
ftp://io.com/%2Fpub/usr/gregg0/scripts/iDiskMounter1.7.hqx

Cheers,
Dan

> Daniel Willson
> Publications Specialist
> University of Alabama at Birmingham
> [EMAIL PROTECTED]
> Telephone: (205) 934-8929
> Facsimile: (205) 975-4416


--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Archives:
Problems?:   [EMAIL PROTECTED]




Re: ping/page script

2000-07-21 Thread Stefan Jeglinski

>I wrote an AppleScript-based solution that fits your bill. It incorporates
>several different freeware/shareware programs, can send email, dial a pager,
>make noise, etc. It's called "The Pinger" and is available on my public
>iDisk, username jlg.

For those of us who are stubborn and still use 8.6, how do we get to this?


Stefan Jeglinski



--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Archives:
Problems?:   [EMAIL PROTECTED]




Re: ping/page script

2000-07-21 Thread Jon Gardner

on 7/19/2000 8:34 PM, Edmund A. Hintz at [EMAIL PROTECTED] wrote:

> After searching long and hard for a Mac OS based App which would:
> 
> A-generate an ICMP ping
> B-was AppleScriptable
> C-cost less that $20
> 
> I gave up. Doesn't mean it doesn't exist, just that I couldn't find it after
> several weeks of on and off searching. So, I resorted to Unix and hacked up

I wrote an AppleScript-based solution that fits your bill. It incorporates
several different freeware/shareware programs, can send email, dial a pager,
make noise, etc. It's called "The Pinger" and is available on my public
iDisk, username jlg.

<><
Jon L. Gardner '89, Computer Systems Manager 
Texas A&M University Dept. of Food Services 
Tel 979.458.1839 * Fax 979.845.2157 * Hip 979.229.4323
PGP public key available at 





--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Archives:
Problems?:   [EMAIL PROTECTED]




Re: ping/page script

2000-07-19 Thread Edmund A. Hintz

DOH! I neglected to mention that it's setup as a cron job, in my case 
running hourly...

Regards,

Ed Hintz
Geek Guy
[EMAIL PROTECTED]

--
>From: "Edmund A. Hintz" <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Cc: [EMAIL PROTECTED]
>Subject: ping/page script
>Date: Wed, Jul 19, 2000, 6:34 PM
>

> Hi All,
> Some time back I mentioned that I wanted a script to intermittently ping
> the retrospect server, and page me if it wasn't working. Nobody mentioned
> any pre-existing items, so I set out to write one.
>
> After searching long and hard for a Mac OS based App which would:
>
> A-generate an ICMP ping
> B-was AppleScriptable
> C-cost less that $20
>
> I gave up. Doesn't mean it doesn't exist, just that I couldn't find it after
> several weeks of on and off searching. So, I resorted to Unix and hacked up
> the following perl script. I tested this on a RedHat 6.1 box and a Mandrake
> 7.1 box, it works fine on both. It does require a working installation of
> sendmail, and a pager or cellphone w/email access, since these are
> ubiquitous and cheap nowadays (good excuse to get a cell on the company
> tab). ;-) I decided an email system is more flexible than an attached modem,
> but the last section which sends the email could be fairly easily modified
> to use an attached modem and dial out to a older pager.
>
> My next plan for the project is to expand it and monitor my other
> servers as well, but I'm starting here. I'm painfully aware that the Unix
> requirement is going to lose a large portion of the target audience, so I
> hope this is useful for somebody. If you use it and want to know when I get
> around to updating it for multiple servers drop me an email and I'll try not
> to lose your address...  ;-)
>
> Note the ol' catch 22-"Qui custodiet ipsos custodes?" (who will watch
> the watchers). If you're really paranoid about high availability you may
> want to set up another server on an independent network connection running
> the same script... OTOH, if you're really paranoid about high availability
> you're likely already running a much nicer system than this...  ;-)
>
>
> #!/usr/bin/perl
>
> use Net::Ping;
>
>
> # This script will attempt to ping a remote server. If the server
> # does not reply, it will attempt 2 more times, waiting for a determined
> # number of seconds between attempts. Upon 3 failures, it will email
> # the specified address of the failure.
> #
> # Variables which need to be set:
> # $ip is the machine to ping
> # $sleep is the number of seconds you wish to wait between pings (300 = 5
> # minutes).
> # $email is the address to which notification is sent (your pager or
> #  cellphone email).
>
> $ip = "192.168.1.1";
> $sleep = 300;
> $email = "you\@yourdomain.com";
>
> # User variables set, clear others:
>
> $down = 0;
>
> # All variables set, let's get to work...
>
> while ($down < 3) {
>
>  $p = Net::Ping->new("icmp");
>
>  if ($p->ping($ip)){
> # print "debug code-its alive";
>   die;
>  }
>
>  else {
>   $down++;
> #  print "debug code-down is now $down";
>   sleep $sleep;
>  }
>  $p->close();
> }
>
> open(MAIL, "| sendmail -oi $email");
> print MAIL < From: server\@yourdomain.com
> Reply-to: admin\@yourdomain.com
> Errors-to: admin\@yourdomain.com
> Sender: server\@yourdomain.com
> Subject: Backup server is down
>
> Backup server is not responding.
>
> EOF
>  close MAIL;
>
> end
>
> Regards,
>
> Ed Hintz
> Geek Guy
> [EMAIL PROTECTED]
>
>
>
> --
> --
> To subscribe:[EMAIL PROTECTED]
> To unsubscribe:  [EMAIL PROTECTED]
> Archives:<http://list.working-dogs.com/lists/retro-talk/>
> Problems?:   [EMAIL PROTECTED]
>
> 



--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Archives:<http://list.working-dogs.com/lists/retro-talk/>
Problems?:   [EMAIL PROTECTED]




ping/page script

2000-07-19 Thread Edmund A. Hintz

Hi All,
Some time back I mentioned that I wanted a script to intermittently ping
the retrospect server, and page me if it wasn't working. Nobody mentioned
any pre-existing items, so I set out to write one.

After searching long and hard for a Mac OS based App which would:

A-generate an ICMP ping
B-was AppleScriptable
C-cost less that $20

I gave up. Doesn't mean it doesn't exist, just that I couldn't find it after
several weeks of on and off searching. So, I resorted to Unix and hacked up
the following perl script. I tested this on a RedHat 6.1 box and a Mandrake
7.1 box, it works fine on both. It does require a working installation of
sendmail, and a pager or cellphone w/email access, since these are
ubiquitous and cheap nowadays (good excuse to get a cell on the company
tab). ;-) I decided an email system is more flexible than an attached modem,
but the last section which sends the email could be fairly easily modified
to use an attached modem and dial out to a older pager.

My next plan for the project is to expand it and monitor my other
servers as well, but I'm starting here. I'm painfully aware that the Unix
requirement is going to lose a large portion of the target audience, so I
hope this is useful for somebody. If you use it and want to know when I get
around to updating it for multiple servers drop me an email and I'll try not
to lose your address...  ;-)

Note the ol' catch 22-"Qui custodiet ipsos custodes?" (who will watch
the watchers). If you're really paranoid about high availability you may
want to set up another server on an independent network connection running
the same script... OTOH, if you're really paranoid about high availability
you're likely already running a much nicer system than this...  ;-)


#!/usr/bin/perl

use Net::Ping;


# This script will attempt to ping a remote server. If the server
# does not reply, it will attempt 2 more times, waiting for a determined
# number of seconds between attempts. Upon 3 failures, it will email
# the specified address of the failure.
#
# Variables which need to be set:
# $ip is the machine to ping
# $sleep is the number of seconds you wish to wait between pings (300 = 5
# minutes).
# $email is the address to which notification is sent (your pager or
#  cellphone email).

$ip = "192.168.1.1";
$sleep = 300;
$email = "you\@yourdomain.com";

# User variables set, clear others:

$down = 0;

# All variables set, let's get to work...

while ($down < 3) {

 $p = Net::Ping->new("icmp");

 if ($p->ping($ip)){
# print "debug code-its alive";
  die;
 }

 else {
  $down++;
#  print "debug code-down is now $down";
  sleep $sleep;
 }
 $p->close();
}

open(MAIL, "| sendmail -oi $email");
print MAIL 
Problems?:   [EMAIL PROTECTED]