Changeset 4062 for monitoring


Ignore:
Timestamp:
11/19/13 17:02:25 (11 years ago)
Author:
sanmai
Message:
  • Fix to reflect changes in interface of check_condition.
Location:
monitoring/plugins/mpi
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • monitoring/plugins/mpi/check_lat_avatech_clam.py

    r4057 r4062  
    1313valid_root_element_tag = "clam"
    1414
    15 def special_main_subroutine(host,
     15def special_main_subroutine(scheme,
     16                            host,
    1617                            http_path,
    1718                            port_number) :
  • monitoring/plugins/mpi/check_lat_oai_endpoint.py

    r4057 r4062  
    1414
    1515
    16 def special_main_subroutine(host,
     16def special_main_subroutine(scheme,
     17                            host,
    1718                            http_path,
    1819                            port_number) :
  • monitoring/plugins/mpi/generic_tla_monitoring.py

    r4061 r4062  
    298298    timestamp = datetime.datetime.today().isoformat()
    299299   
    300     try :
    301         if protocol == 'http' :
     300    try : 
     301        if protocol == 'http' : 
    302302            conn = httplib.HTTPConnection(host = host,
    303303                                          port = port_number,
    304304                                          strict = True)
    305         elif protocol == 'https' :
    306 
    307            
     305        elif protocol == 'https' :           
    308306            conn = httplib.HTTPSConnection(host = host,
    309307                                           port = port_number,
     
    311309        request = conn.request(HTTP_method,
    312310                               http_path)
    313     except :
     311    except : 
    314312        traceback_string = traceback.format_exc()
    315313
     
    322320                                                                                                            host = host)
    323321               }
    324     else :
    325         try :
     322    else : 
     323        try : 
    326324            response = conn.getresponse()
    327325
     
    329327           
    330328            conn.close()
    331         except :
     329        except : 
    332330            traceback_string = traceback.format_exc()
    333331
    334332            handle_connection_failure(traceback_string + "\nThis problem originates from location 2 in '" + special_plugin_file_name + "'.\n")
    335         else :
     333        else : 
    336334
    337335            redirecting_responses = frozenset([
     
    342340                                          ]) 
    343341
    344             if response.status == httplib.OK :
    345             # HTTP status codes 200 and 302
    346             # X- Resolve redirect in case of HTTP status == 302
     342            if response.status == httplib.OK : 
     343                # HTTP status codes 200 and 302
     344                # X- Resolve redirect in case of HTTP status == 302
    347345                well_formed = validator(data                   = data,
    348346                                        descriptive_string     = http_path,
    349347                                        **validator_arguments) # ['validator_arguments'])
    350348
    351                 if well_formed :
    352 
     349                if well_formed :
    353350                    return {
    354351                            "code"      : "OK",
Note: See TracChangeset for help on using the changeset viewer.