Need to know site has redirection.

All questions related to installations, configurations and maintenance of Advanced Host Monitor (including additional tools such as RMA for Windows, RMA Manager, Web Servie, RCC).
Post Reply
sgauthier41
Posts: 24
Joined: Tue Feb 23, 2010 1:18 pm

Need to know site has redirection.

Post by sgauthier41 »

Hello !

We have here many web sites that we sometimes put offline with a maintenance page. Our problem is that we want an alert when this web page is up. Right now, the way we're set up (and it doesn't work, hence this question), we deactivate in HostMonitor the Code 302 redirect OK.

The test is set up to access a specific subdirectory like:

http://www.website.com/webpage.htm

We want an alert when HostMon tries this above address but get this page as an answer:

http://www.website.com/maintenance.htm

Hope I'm clear enough,

Thanks !

Simon
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Right now, the way we're set up (and it doesn't work, hence this question), we deactivate in HostMonitor the Code 302 redirect OK
Yes, this is correct way. Could you please explain what exactly means "doesn't work"? What test status is displayed? Does your server issue code 302 for redirection or you are using some custom made script on server side?

Regards
Alex
sgauthier41
Posts: 24
Joined: Tue Feb 23, 2010 1:18 pm

Post by sgauthier41 »

Hello Alex !

By not working, I mean we set up the test like this (to see it fail and give us a Bad result because of the redirect) :

We put this URL to test:

http://www.website.com/

so that a redirect will go to

http://www.website.com/maintenance.htm

At this moment, we get a Good result (!)

Thanks for your help !

Simon
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

What about my 2nd question?
Does your server issue HTTP code 302 for redirection or you are using some custom made script on server side?
Can we access your server for testing?

Regards
Alex
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Thanks for the links.
As we see non of these servers return HTTP code 302.
1st and 3rd servers use code 301. 2nd server returns code 200

You may setup HostMonitor to check for code 301 as well. Just create HTTP test method instead of URL test method.
Also you may setup HostMonitor to use "Warning" status for HTTP code 301 and use "Bad" status for other error codes (e.g. 404 or 501) using the following option [x] Use Warning status if '%HttpCode%'=='301' for the test

Regards
Alex
sgauthier41
Posts: 24
Joined: Tue Feb 23, 2010 1:18 pm

Post by sgauthier41 »

Hello again!

Can I go in a reverse way from your suggestion and create a warning when I don't get a 200 code ?

If yes, how do I set up the %Httpcode% exactly ? Is it like this :

'%HttpCode%'<==>'301' ?

Thanks !
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Sure, you can.
Please check the following sections of the manual
http://www.ks-soft.net/hostmon.eng/mfra ... m#userexpr
http://www.ks-soft.net/hostmon.eng/mfra ... uneupreply

'%HttpCode%'<>'301'

Regards
Alex
sgauthier41
Posts: 24
Joined: Tue Feb 23, 2010 1:18 pm

Post by sgauthier41 »

Hello again Alex !

Thanks for your last answer regarding the HTTP return codes. I use the %http code%<>200 as a status of my web pages. The problem I have now, is that my passive RMA (with version 4.03) sometimes get no reply so my test automatically switches to warning mode. If I refresh my tests manually, I'll get these tests to work 8 out of 10 times.

Do you see a solution for me ?

Regards

Simon
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

What kind of solution?
I think you should check why web server does not respond or why RMA does not receive answer (if server responds).
You may check web server logs to find out if it works correctly, if it receives all requests from agent, check connection using tracert or similar utilities to see which host loses connection and so on...

If you just want to ignore this problem, you may configure HostMonitor to start alerts after 2nd or 3rd consecutive failure. Plus you may use "Repeat test" action after 1st (2nd) failure.
http://www.ks-soft.net/hostmon.eng/mfra ... #actRepeat

Regards
Alex
Post Reply