401 - Unauthorized

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
florian
Posts: 6
Joined: Mon Oct 17, 2011 9:23 am

401 - Unauthorized

Post by florian »

I'm checking some simple HTML-Pages that require authorization (password protected pages with username/password) without passing authorisation. The HostMonitor Reply is:
Test Status: Bad
Error code: 401
Error msg: Unauthorized

I need to set status to OK for error code 401 and to BAD for all other error codes.

Is any possibility to archieve this?

Thank you in advance
Florian
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Post by KS-Soft Europe »

You may use "Use Normal Status if" option with expression like the following:
%HTTPCode%==401
Also, if you want to be alerted when HTTP page returns OK (HTTP code 200),
you may use "Use warning status if" option with expression like the following:
%HTTPCode%==200

Please check the manual or visit our web site for more information at:
Use Warning status option: http://www.ks-soft.net/hostmon.eng/mfra ... ningstatus
Use Normal status option: http://www.ks-soft.net/hostmon.eng/mfra ... rmalstatus
florian
Posts: 6
Joined: Mon Oct 17, 2011 9:23 am

Thank you

Post by florian »

I tested it before with %Reply%==401 but no way, %HTTPCode%==401 does the trick!
Thank you very much and have a nice day!
Florian
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Post by KS-Soft Europe »

You are welcome!
BTW: You may also use macro variables like %HttpPage%, %HttpHeader% and %HostURL% with URL request or HTTP test methods:
http://www.ks-soft.net/hostmon.eng/mfra ... ificmacros
Post Reply