Changeset 3257


Ignore:
Timestamp:
08/06/13 13:15:09 (11 years ago)
Author:
sanmai
Message:
  • Work on LDAP monitoring plugin.
Location:
monitoring/plugins/mpi
Files:
2 edited

Legend:

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

    r3256 r3257  
    1515special_plugin_file_name = os.path.basename(__file__)
    1616command_line_parameters = [("-h", "host",),
    17                                                    ("-b", "bind DN",)]
     17                           ("-b", "bind DN",)]
    1818
    1919# Warning: check of validity of returned data relies on the XML namespace OAI_NAMESPACE of the returned XML markup.
     
    2222                            bindDN) :
    2323
    24         results = map(lambda UP_URL :  generic_tla_monitoring.check_ldap(host = host,
    25                                                                                                                              bindDN = bindDN,
    26                                                                                          validator = generic_tla_monitoring.check_LDAP_validity,
    27                                                                                                                                          special_plugin_file_name  = special_plugin_file_name),
    28                                                                                                                                          (host,)) # X- allow for multiple hosts
     24    results = map(lambda UP_URL : generic_tla_monitoring.check_ldap(host = host, \
     25                                                                    bindDN = bindDN, \
     26                                                                    validator = generic_tla_monitoring.check_LDAP_validity, \
     27                                                                    special_plugin_file_name = special_plugin_file_name), \
     28                                                                    (host,)
     29                                                                    ) # X- allow for multiple hosts
    2930   
    3031    generic_tla_monitoring.nagios_return_complex(results,
     
    3334if __name__ == "__main__" :
    3435    generic_tla_monitoring.main(special_main_subroutine = special_main_subroutine,
    35                                                         command_line_parameters = command_line_parameters)
     36                                command_line_parameters = command_line_parameters)
  • monitoring/plugins/mpi/generic_tla_monitoring.py

    r3256 r3257  
    2525        print "[" + reporter + "] " + result['code'] + ": " + result['message']
    2626        return result['code']
    27 
     27   
    2828    pdb.set_trace()
    29 
     29   
    3030    # Scan all condition/status check results and create a list of appropriate exit codes.
    3131    exit_code_keys          = map(lambda result     : deal_with_result(result, reporter), results)
    3232    suggested_exit_codes    = list(map(lambda key   : nagios_codes[key], exit_code_keys))
    33 
     33   
    3434    # Exit with the highest suggested exit code, because the higher the exit code the more problematic the status is and problems have priority over harmony.
    3535    sys.exit(max(suggested_exit_codes))
Note: See TracChangeset for help on using the changeset viewer.