Forum Moderators: open

Message Too Old, No Replies

Server Downtime

a script to test

         

cmatcme

4:04 pm on Apr 5, 2005 (gmt 0)

10+ Year Member



Hi all.

I was wandering if there was any asp script or resource to test whether a different server is having downtime.

Is it possible? I g'ed asp test server downtime and brought up no results about what I wanted.

a sad cmatcme :(

txbakers

4:12 pm on Apr 5, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



if you get a "Page Cannot be Displayed" then you know the server is down.

dotme

4:13 pm on Apr 5, 2005 (gmt 0)

10+ Year Member



Not sure about ASP. I use ServersAlive which is a windows app. Free version supports up to 10 hosts/ports and I use it to monitor my servers. I'd recommend it.

cmatcme

4:34 pm on Apr 5, 2005 (gmt 0)

10+ Year Member



txbakers//

I want users to be able visit an asp page on one site to test whether another site is having downtime. The other site will also have asp

dotme//

Thanks for the recommendation. I'll consider downloading it, but I wish user's to be able access this information in their browser.

question?//

Is it possible to use Scripting.FileSystemObject to display a certain message if a page is say from 4-5 kb and display a message if it is or if it isn't?

cmatcme

mattglet

5:41 pm on Apr 5, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I would fire off a HTTP request to the page, and check for a 200 response code from the page you're trying to test.

If you don't get a 200, then throw an error.

Set objXMLHTTP = Server.CreateObject("MSXML2.XMLHTTP")
objXMLHTTP.Open "GET", "http://www.example.com", false
objXMLHTTP.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
objXMLHTTP.send()

If objXMLHTTP.status <> "200" Then
' throw error
End If

Set objXMLHTTP = Nothing

Easy_Coder

3:32 am on Apr 6, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I use a 3rd party service to ping my applications every hour and report to my cellphone when one is unavailable. Once per week they email me an uptime status report.

Sticky me if you want to know which service I'm using.

txbakers

3:35 am on Apr 6, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I looked at a service like that too, but now I have so many people using my site that the minute it's down my cell phone starts ringing from them!

It's a double edged sword of course. I get free uptime checking, but the people that are calling are my customers, who probably aren't very happy.

cmatcme

9:25 am on Apr 6, 2005 (gmt 0)

10+ Year Member



Thanks mattglet. I've added the checker to the website and it's correctly identified that we are in uptime.

The next test is when we next have downtime!

cmatcme

Easy_Coder

12:51 pm on Apr 6, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yeah your right txbakers... I'm just hoping that I find out before my customers find out. I don't want my paying customer to inform me that there's a problem that I'm unaware of.

I like matts 200 check script too, you could easily que that hugger up on another server and let it run 'all the time' then build in a paging mechanism whenever it's not 200.

trillianjedi

12:56 pm on Apr 6, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



if you get a "Page Cannot be Displayed" then you know the server is down.

Could those types of errors also be caused by a local DNS problem?

I suppose you could build an app/script called by CRON every few seconds that requests a page from the webserver localhost, and fires you off an email/SMS in the event of a problem.

At least that way you rule out any networking issues between you and the server potentially triggering a false alarm.

I'd be surprised if there are not scripts around that do something like that?

TJ

cmatcme

5:40 pm on Apr 6, 2005 (gmt 0)

10+ Year Member



Could those types of errors also be caused by a local DNS problem?

If you go to [ Tools --> Options --> Advanced --> Uncheck Show Friendly HTTP Error Messages ] then you know whether it's a local or server error.

cmatcme

dotme

8:13 pm on Apr 6, 2005 (gmt 0)

10+ Year Member



ServersAlive can optionally create HTML output. It can also FTP-upload that page to the server of your choice, allowing real-time status reports. It generates a logfile too, to allow you to track downtime. That logfile can be kept private.