serverunion
07-26-2004, 10:50 AM
Need a script to check to see if sites are up and txt msg my phone if they aren't.
Will need to run on ASP/windows. Need some idea abou the script and how to autorun it on windows.
Thanks in advance...
Natron
athomas
08-01-2004, 12:42 PM
try looking for something on hotscripts.com, they have a bunch of server scripts there. I use them for mine.
I know you said ASP, But if there is anyway you can do it in PHP.....It's quite easy.. I don't know ASP so I cant help you.
ferox
09-03-2004, 02:56 AM
Carp, If you post the PHP version, one of us here can try porting it to ASP for serverunion. :)
ferox
09-03-2004, 03:09 AM
Follow Up: Not to mention, serverunion can even autorun the PHP scripts on Windows if it's not mandatory to be in ASP.
barrywien
09-03-2004, 08:40 AM
You need a third party gateway to handle the sending of the actual SMS message, and you will need a second server to run the script from on a cron ever few minutes, if site goes down send SMS or email etc.
serverunion
09-05-2004, 01:22 AM
the reason for the ASP or windows solution is that I have a colocated windows box at high end datacenter, thought I could leverage that.
mwaseem
09-06-2004, 02:22 AM
to check to see if sites are up and txt msg my phone if they aren't.
Does Servers Alive (http://www.woodstone.nu/salive/features.asp) fulfils your requirements?
Servers Alive can alert you via:
Pager/SMS - Receive numeric or alphanumeric pages.
Email - SMTP, ESMTP, or custom mailer.
Sound - Play the sound of your choosing.
Instant Messenger - Receive an ICQ, MSN or AIM alert or even a winpopup message
Syslog - Use a central syslog server to centralize logs.
serverunion
09-08-2004, 10:29 AM
Originally posted by mwaseem
Does Servers Alive (http://www.woodstone.nu/salive/features.asp) fulfils your requirements?
Looks great THANKS. Since I have box with 99.99 uptime, a lot more cost effective to run my own monitoring service.
Thanks for all the help...
Kijit Solutions
08-01-2005, 11:20 PM
ServerUnion,
You can do the following:
$fp = fopen('http://servertocheck.com','r');
if (!$fp){
mail('cellphonenumber@provider.com', 'Server Down yayyyy', 'hey wake up your server\'s down');
}
fclose($fp);
You can find your cellphone's email-to-sms address by just looking around on google. For Rogers (Canadian Provider), its pcs.rogers.com. Say my number was 416-123-1234, my email would be 4161231234@pcs.rogers.com.
Make sure it's on a different server from the one you're checking.. else you won't get the message obviously.
You can stick this snippit in some global php file on a fairly large site so once someone accesses that site, they're involuntarly also checking your site for uptime. =) Or you can stick this in a cronjob using curl.
gilbert
08-01-2005, 11:27 PM
which celphone provider are we talkin about
Kijit Solutions
08-01-2005, 11:33 PM
You can find your cell phone provider's email here:
http://www.aipcom.com/support/email-finder.asp