Http "forbidden" errors
list Larry Barber
Henrik, I currently have an http test that is getting a "403 Forbidden" response. Hobbit is not marking this as an error. Would it be possible to have Hobbit treat a "Forbidden" response as an error and alert on it? Thanks, Larry Barber
list Stewart Larsen
I would expect 400 errors to come back yellow and 500 errors to be red.
▸
From: Larry Barber [mailto:user-6ef9c2864140@xymon.invalid]
Sent: Friday, June 09, 2006 9:26 AM
To: user-ae9b8668bcde@xymon.invalid
Subject: [hobbit] Http "forbidden" errors
Henrik, I currently have an http test that is getting a "403 Forbidden"
response. Hobbit is not marking this as an error. Would it be possible
to have Hobbit treat a "Forbidden" response as an error and alert on it?
Thanks,
Larry Barber
Spam <https://antispam.doh.ad.state.fl.us/canit/b.php?c=s&i=82395813&m=321921 c6947f> Not spam <https://antispam.doh.ad.state.fl.us/canit/b.php?c=n&i=82395813&m=321921 c6947f> Forget previous vote <https://antispam.doh.ad.state.fl.us/canit/b.php?c=f&i=82395813&m=321921 c6947f>
list Frédéric Mangeant
▸
Larry Barber a écrit :
Henrik, I currently have an http test that is getting a "403 Forbidden" response. Hobbit is not marking this as an error. Would it be possible to have Hobbit treat a "Forbidden" response as an error and alert on it?
Hi
in bbnet/httpresult.c there's this :
switch(status) {
case 000: /* transportlayer reports error */
result = (h->dialup ? COL_CLEAR : COL_RED);
break;
case 100: /* Continue - should be ok */
case 200: case 201: case 202: case 203: case 204: case 205: case 206:
case 301: case 302: case 303: case 307:
case 401: case 403: /* Is "Forbidden" an OK status ? */
result = COL_GREEN;
break;
case 400: case 404: case 405: case 406:
result = COL_RED; /* Trouble getting page */
break;
case 500:
case 501:
case 502: /* Proxy error */
case 503:
case 504:
case 505:
result = COL_RED; /* Server error */
break;
You can modify it and rebuild your Hobbit server.
--
Frédéric Mangeant
Steria EDC Sophia-Antipolis
list Henrik Størner
▸
On Fri, Jun 09, 2006 at 08:25:53AM -0500, Larry Barber wrote:
Henrik, I currently have an http test that is getting a "403 Forbidden" response. Hobbit is not marking this as an error. Would it be possible to have Hobbit treat a "Forbidden" response as an error and alert on it?
Since Frederic has already been quoting my source-code, I guess it's evident that I have been in doubt about this particular error code. The reason it does not cause a yellow or red status is that "Forbidden" is a common result when testing websites that require authentication. Your Hobbit server may not have the required authentication, and in that case a red status because of a 403 error would be misleading. One could also argue that if the server is so much alive as to respond with a "Forbidden" status, then there is a fair chance that it is actually running OK. So my suggestion is that if you must have a red status if you get a 403 status back, then implement a content-check and look for something in the response that must be present. Regards, Henrik