Changeset 4049 for monitoring
- Timestamp:
- 11/19/13 13:04:40 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
monitoring/plugins/mpi/generic_tla_monitoring.py
r4047 r4049 288 288 289 289 try : 290 conn = httplib.HTTPConnection(host = host, port = port_number) # X- accomodate https? 291 292 request = conn.request(HTTP_method, http_path) 290 conn = httplib.HTTPConnection(host = host, 291 port = port_number 292 strict = True) # X- accomodate https? 293 294 request = conn.request(HTTP_method, 295 http_path) 293 296 except : 294 297 traceback_string = traceback.format_exc() … … 323 326 # HTTP status codes 200 and 302 324 327 # X- Resolve redirect in case of HTTP status == 302 325 well_formed = validator(data 328 well_formed = validator(data = data, 326 329 descriptive_string = http_path, 327 330 **validator_arguments) # ['validator_arguments']) … … 344 347 345 348 346 347 return check_condition(host = parsed_new_location_URL.netloc, 348 http_path = parsed_new_location_URL.path, 349 HTTP_method = HTTP_method, 350 port_number = port_number, 351 authorize = authorize, 352 validator = validator, 353 **validator_arguments) # special_plugin_file_name = validator_arguments['special_plugin_file_name'] 349 if host == parsed_new_location_URL and http_path == parsed_new_location_URL : 350 return { 351 "code" : "CRITICAL", 352 "message" : 'Host %s is up but the response to GET "%s" implies an infinite redirection (to "%s").' % (host, http_path) 353 } 354 355 else : 356 357 return check_condition(host = parsed_new_location_URL.netloc, 358 http_path = parsed_new_location_URL.path, 359 HTTP_method = HTTP_method, 360 port_number = port_number, 361 authorize = authorize, 362 validator = validator, 363 **validator_arguments) # special_plugin_file_name = validator_arguments['special_plugin_file_name'] 354 364 355 365 elif response.status == httplib.UNAUTHORIZED and authorize == False :
Note: See TracChangeset
for help on using the changeset viewer.