472,352 Members | 1,566 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,352 software developers and data experts.

Website Monitoring Script

Is there a script that monitor (ping) my website every hour and run iisreset
if it receives an error or no response.

Thanks
Aaron
Jul 21 '05 #1
14 4559
Have you seen this?

http://www.gfi.com/nsm/nsmfreeware.htm

Regards

Oli
"Aaron" <ku*****@yahoo.com> wrote in message
news:uE****************@TK2MSFTNGP12.phx.gbl...
Is there a script that monitor (ping) my website every hour and run
iisreset
if it receives an error or no response.

Thanks
Aaron

Jul 21 '05 #2
Actually if you don't mind spending just a little bit of money you can do really
well getting hostmon from ks-soft... It will do all sorts of other nice things
like track access time on the pages, etc.

http://www.ks-soft.com/hostmon.eng/index.htm

--
Joe Richards Microsoft MVP Windows Server Directory Services
www.joeware.net

Aaron wrote:
Is there a script that monitor (ping) my website every hour and run iisreset
if it receives an error or no response.

Thanks
Aaron

Jul 21 '05 #3
I tried to install it, but it doesn;'t work on my win xp pro machine.
I want to test it before I run it on the production server
(windows 2003)

"Oli Restorick [MVP]" <ol*@mvps.org> wrote in message
news:u1**************@tk2msftngp13.phx.gbl...
Have you seen this?

http://www.gfi.com/nsm/nsmfreeware.htm

Regards

Oli
"Aaron" <ku*****@yahoo.com> wrote in message
news:uE****************@TK2MSFTNGP12.phx.gbl...
Is there a script that monitor (ping) my website every hour and run
iisreset
if it receives an error or no response.

Thanks
Aaron


Jul 21 '05 #4
I tried this but I can't find the feature that resets IIS.
Can it do that?

thx

"Joe Richards [MVP]" <hu**********@hotmail.com> wrote in message
news:ek*************@TK2MSFTNGP11.phx.gbl...
Actually if you don't mind spending just a little bit of money you can do really well getting hostmon from ks-soft... It will do all sorts of other nice things like track access time on the pages, etc.

http://www.ks-soft.com/hostmon.eng/index.htm

--
Joe Richards Microsoft MVP Windows Server Directory Services
www.joeware.net

Aaron wrote:
Is there a script that monitor (ping) my website every hour and run iisreset if it receives an error or no response.

Thanks
Aaron

Jul 21 '05 #5
You can script whatever responses you want it to do for you. Check out the docs.

--
Joe Richards Microsoft MVP Windows Server Directory Services
www.joeware.net

Aaron wrote:
I tried this but I can't find the feature that resets IIS.
Can it do that?

thx

"Joe Richards [MVP]" <hu**********@hotmail.com> wrote in message
news:ek*************@TK2MSFTNGP11.phx.gbl...
Actually if you don't mind spending just a little bit of money you can do


really
well getting hostmon from ks-soft... It will do all sorts of other nice


things
like track access time on the pages, etc.

http://www.ks-soft.com/hostmon.eng/index.htm

--
Joe Richards Microsoft MVP Windows Server Directory Services
www.joeware.net

Aaron wrote:
Is there a script that monitor (ping) my website every hour and run
iisreset
if it receives an error or no response.

Thanks
Aaron


Jul 21 '05 #6
All these programs are too expensive for me.
Can I do this with DOS, I don't need anything complicated.

1.Download a file from a website
2. If the download fails run iisreset
*I'll just add this batch file to schedule tasks in windows.

Thanks.
A
"Aaron" <ku*****@yahoo.com> wrote in message
news:uE****************@TK2MSFTNGP12.phx.gbl...
Is there a script that monitor (ping) my website every hour and run iisreset if it receives an error or no response.

Thanks
Aaron

Jul 21 '05 #7

"Aaron" <ku*****@yahoo.com> wrote in message
news:OW**************@TK2MSFTNGP09.phx.gbl...
All these programs are too expensive for me.
Can I do this with DOS, I don't need anything complicated.

1.Download a file from a website
2. If the download fails run iisreset
*I'll just add this batch file to schedule tasks in windows.


I guess you could get a copy of wget and test with that but try WSH.
Goto http://www.paulsadowski.com/WSH/xmlhttp.htm and look at the
HTMLHead.vbs script and go from there.
Jul 21 '05 #8

"Aaron" <ku*****@yahoo.com> wrote in message
news:uE****************@TK2MSFTNGP12.phx.gbl...
Is there a script that monitor (ping) my website every hour and run
iisreset
if it receives an error or no response.


Change URL and CMD strings to whatever you need.

'CheckServer.vbs
URL = http://localhost
CMD = "cscript c:\inetpub\adminscripts\iisreset.vbs"

Set WshShell = WScript.CreateObject("WScript.Shell")
Set http = CreateObject("Microsoft.XmlHttp")

on error resume next
http.open "HEAD", URL, FALSE
http.send ""
if http.Status <> "200" then
WshShell.Run CMD
end if

set http = nothing
set WshShell = nothing
Jul 21 '05 #9
If you can script in perl you can use the LWP module to pull the info and then
if the script runs on the local web server you can do an iisreset, otherwise you
can rcmd or telnet to the remote server and do the reset. However, you have to
have someone logged on all of the time or find some other way to run the monitor
script as a service.

--
Joe Richards Microsoft MVP Windows Server Directory Services
www.joeware.net

Aaron wrote:
All these programs are too expensive for me.
Can I do this with DOS, I don't need anything complicated.

1.Download a file from a website
2. If the download fails run iisreset
*I'll just add this batch file to schedule tasks in windows.

Thanks.
A
"Aaron" <ku*****@yahoo.com> wrote in message
news:uE****************@TK2MSFTNGP12.phx.gbl...
Is there a script that monitor (ping) my website every hour and run


iisreset
if it receives an error or no response.

Thanks
Aaron


Jul 21 '05 #10
Why don't you get hold of an evaluation copy of Windows Server 2003 from
Microsoft's web site to do your testing?

Oli
"Aaron" <ku*****@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
I tried to install it, but it doesn;'t work on my win xp pro machine.
I want to test it before I run it on the production server
(windows 2003)

"Oli Restorick [MVP]" <ol*@mvps.org> wrote in message
news:u1**************@tk2msftngp13.phx.gbl...
Have you seen this?

http://www.gfi.com/nsm/nsmfreeware.htm

Regards

Oli
"Aaron" <ku*****@yahoo.com> wrote in message
news:uE****************@TK2MSFTNGP12.phx.gbl...
> Is there a script that monitor (ping) my website every hour and run
> iisreset
> if it receives an error or no response.
>
> Thanks
> Aaron
>
>



Jul 21 '05 #11
Thanks Paul this works great.
I want to add one more thing
if http.Status <> "200" and does not finish downloading in 10 sec.
URL = "http://localhost"
CMD = "c:\windows\system32\iisreset.exe"

Set WshShell = WScript.CreateObject("WScript.Shell")
Set http = CreateObject("Microsoft.XmlHttp")

on error resume next
http.open "GET", URL, FALSE
http.send ""
if http.Status <> "200" then <<<<<<<<<<<<<<<<<<
WshShell.Run CMD
else
WScript.Echo "OK"
end if

set http = nothing
set WshShell = nothing


"Paul R. Sadowski" <xp***@mailshell13.mailshell.com> wrote in message
news:uE**************@TK2MSFTNGP10.phx.gbl...

"Aaron" <ku*****@yahoo.com> wrote in message
news:uE****************@TK2MSFTNGP12.phx.gbl...
Is there a script that monitor (ping) my website every hour and run
iisreset
if it receives an error or no response.


Change URL and CMD strings to whatever you need.

'CheckServer.vbs
URL = http://localhost
CMD = "cscript c:\inetpub\adminscripts\iisreset.vbs"

Set WshShell = WScript.CreateObject("WScript.Shell")
Set http = CreateObject("Microsoft.XmlHttp")

on error resume next
http.open "HEAD", URL, FALSE
http.send ""
if http.Status <> "200" then
WshShell.Run CMD
end if

set http = nothing
set WshShell = nothing

Jul 21 '05 #12

"Aaron" <ku*****@yahoo.com> wrote in message
news:uy**************@tk2msftngp13.phx.gbl...
Thanks Paul this works great.
I want to add one more thing
if http.Status <> "200" and does not finish downloading in 10 sec.


Do you really mean that or do you mean if the status does not = 200 **OR**
the time for the head request to return is greater than 10 seconds? The
script below assumes my interpretation.

If you really mean your way then change this line
if http.Status <> "200" or DateDiff("s", StartTime, EndTime) > 10 then
to
if http.Status <> "200" and DateDiff("s", StartTime, EndTime) > 10 then

'CheckServer.vbs
URL = http://localhost
CMD = "cscript c:\inetpub\adminscripts\iisrestart.vbs"

Set WshShell = WScript.CreateObject("WScript.Shell")

on error resume next
Set http = CreateObject("Microsoft.XmlHttp")
http.open "HEAD", URL, FALSE
StartTime = Now
http.send ""
EndTime = Now

if http.Status <> "200" or DateDiff("s", StartTime, EndTime) > 10 then
WshShell.Run CMD
end if
set http = nothing
set WshShell = nothing
Jul 21 '05 #13
Oops, I pasted my test copy. The proper order is to create the Xml.Http
object before the error handling. Minor thing but we want to see if there's
a problem creating either object so they should come before the error
handling.

URL = "http://localhost"
CMD = "cscript c:\inetpub\adminscripts\iisrestart.vbs"

Set WshShell = WScript.CreateObject("WScript.Shell")
Set http = CreateObject("Microsoft.XmlHttp")

on error resume next

http.open "HEAD", URL, FALSE
StartTime = Now
http.send ""
EndTime = Now

if http.Status <> "200" or DateDiff("s", StartTime, EndTime) > 10 then
WshShell.Run CMD
end if

set http = nothing
set WshShell = nothing
"Paul R. Sadowski" <xp***@mailshell13.mailshell.com> wrote in message
news:ec**************@TK2MSFTNGP12.phx.gbl...

"Aaron" <ku*****@yahoo.com> wrote in message
news:uy**************@tk2msftngp13.phx.gbl...
Thanks Paul this works great.
I want to add one more thing
if http.Status <> "200" and does not finish downloading in 10 sec.


Do you really mean that or do you mean if the status does not = 200 **OR**
the time for the head request to return is greater than 10 seconds? The
script below assumes my interpretation.

If you really mean your way then change this line
if http.Status <> "200" or DateDiff("s", StartTime, EndTime) > 10 then
to
if http.Status <> "200" and DateDiff("s", StartTime, EndTime) > 10 then

'CheckServer.vbs
URL = http://localhost
CMD = "cscript c:\inetpub\adminscripts\iisrestart.vbs"

Set WshShell = WScript.CreateObject("WScript.Shell")

on error resume next
Set http = CreateObject("Microsoft.XmlHttp")
http.open "HEAD", URL, FALSE
StartTime = Now
http.send ""
EndTime = Now

if http.Status <> "200" or DateDiff("s", StartTime, EndTime) > 10 then
WshShell.Run CMD
end if
set http = nothing
set WshShell = nothing

Jul 21 '05 #14
This is awesome! thanks for your help

"Paul R. Sadowski" <xp***@mailshell13.mailshell.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Oops, I pasted my test copy. The proper order is to create the Xml.Http
object before the error handling. Minor thing but we want to see if there's a problem creating either object so they should come before the error
handling.

URL = "http://localhost"
CMD = "cscript c:\inetpub\adminscripts\iisrestart.vbs"

Set WshShell = WScript.CreateObject("WScript.Shell")
Set http = CreateObject("Microsoft.XmlHttp")

on error resume next

http.open "HEAD", URL, FALSE
StartTime = Now
http.send ""
EndTime = Now

if http.Status <> "200" or DateDiff("s", StartTime, EndTime) > 10 then
WshShell.Run CMD
end if

set http = nothing
set WshShell = nothing
"Paul R. Sadowski" <xp***@mailshell13.mailshell.com> wrote in message
news:ec**************@TK2MSFTNGP12.phx.gbl...

"Aaron" <ku*****@yahoo.com> wrote in message
news:uy**************@tk2msftngp13.phx.gbl...
Thanks Paul this works great.
I want to add one more thing
if http.Status <> "200" and does not finish downloading in 10 sec.


Do you really mean that or do you mean if the status does not = 200 **OR** the time for the head request to return is greater than 10 seconds? The
script below assumes my interpretation.

If you really mean your way then change this line
if http.Status <> "200" or DateDiff("s", StartTime, EndTime) > 10 then
to
if http.Status <> "200" and DateDiff("s", StartTime, EndTime) > 10 then

'CheckServer.vbs
URL = http://localhost
CMD = "cscript c:\inetpub\adminscripts\iisrestart.vbs"

Set WshShell = WScript.CreateObject("WScript.Shell")

on error resume next
Set http = CreateObject("Microsoft.XmlHttp")
http.open "HEAD", URL, FALSE
StartTime = Now
http.send ""
EndTime = Now

if http.Status <> "200" or DateDiff("s", StartTime, EndTime) > 10 then
WshShell.Run CMD
end if
set http = nothing
set WshShell = nothing


Jul 21 '05 #15

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Sven Dzepina | last post by:
Hi All, how I can make a simply HostWatch - system which use a mysql DB and send me an e-Mail if the Server goes off and again on? I began to...
0
by: Mike Curry | last post by:
I am offering free basic website monitoring, looking for some people interested in trying it out. ...
1
by: Lintie | last post by:
Hi, I have a website that I want to use as a virutal directory in another website. But when navigating to this stite I get the error below. ...
13
by: Aaron | last post by:
Is there a script that monitor (ping) my website every hour and run iisreset if it receives an error or no response. Thanks Aaron
19
by: Erik Sandblom | last post by:
Hello I can't read the London & Continental Railways website and they have no email address to complain to. I tried calling them, but got put...
2
by: Arthur Dent | last post by:
Hello all, We have a development web server where we host our sites under development and let clients look at them as they are coming along at...
16
by: nmdc69 | last post by:
Hi folks, Is there a simple way to log IP's without CGI? I need to log the IP's of the visitors to a website I run. I used to have a CGI script...
9
by: jcor | last post by:
HI, I need every day to upload several files to a website (go to site, click "browse", wait for the upload and its done). I'd like to automate...
1
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand....
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.