Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: May 2003
Posts: 1,068
Junior Member
Junior Member
Offline
Joined: May 2003
Posts: 1,068
I wrote this up to run a simple IP check and alert from any Windows machine. Basically, it runs a ping and alerts you by email and/or popup message if your site is down. All the files needed to run this are included in the zip.
Attachments
109219-ipalert.zip (0 Bytes, 86 downloads)

Sponsored Links
Joined: Mar 2003
Posts: 159
Member
Member
Joined: Mar 2003
Posts: 159
[]ericgtr said:
I wrote this up to run a simple IP check and alert from any Windows machine. Basically, it runs a ping and alerts you by email and/or popup message if your site is down. All the files needed to run this are included in the zip. [/]
Very cool and much appreciated. Please give more details as to how to set it.

Thanks,

BWilliams

Joined: May 2003
Posts: 1,068
Junior Member
Junior Member
Offline
Joined: May 2003
Posts: 1,068
If you edit the batch (right click on it and select "Edit") file the instructions should tell you all you need to know. I think the only thing I didn't describe is the sleep command, that is set for 60 seconds in the script, you can change that to whatever you want.

Joined: May 2003
Posts: 1,068
Junior Member
Junior Member
Offline
Joined: May 2003
Posts: 1,068
Here is an example of your site, socaps.com. You will still need to edit the Postie part for your mail settings though.

Code
 <br />:: Make sure it is ran in the same direcorty as all the accompanying .exe files. <br />:: This script will check that your site is up, please see the commented instructions below. <br /> <br />:TOP <br />@echo off <br />IF EXIST status.txt DEL status.txt <br />echo | time /t <br />::Type in your site name below. <br />ping socaps.com >status.txt <br />echo | time /t >>status.txt <br />::Type in your IP address below. <br />type status.txt | find /i "64.62.140.213" <br />echo Searching string... <br />if %errorlevel% EQU 1 GOTO DROP <br />if %errorlevel% EQU 0 GOTO RESTART <br /> <br />:DROP <br />echo Your site is not responding. Proceeding to send a message.. <br />::Optional: uncomment the next line to send a popup message to yourself, Messenger service must be started. <br />::net send localhost Your site is currently unavailabe! <br />::Fill in the info below with your information, you may want to use a differnt email than what's on your site. <br />postie.exe -host:mail.yourserver.com -to:[email protected] -from:"[email protected]" -s:"Down Message" -msg:"Your Site is currently unavailable!" <br />echo Message sent. <br />choice Run this script again? <br />if %errorlevel% EQU 1 GOTO TOP <br />IF %ERRORLEVEL% EQU 2 GOTO EOF <br />GOTO EOF <br /> <br /> <br />:RESTART <br />echo Received a response. <br />sleep 2 <br />echo Sleeping... <br />sleep 60 <br />cls <br />GOTO TOP <br /> <br />:EOF <br />


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
AllenAyres
AllenAyres
Texas
Posts: 21,079
Joined: March 2000
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)