Changeset 3253
- Timestamp:
- 08/06/13 12:53:41 (11 years ago)
- Location:
- monitoring/plugins/mpi
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
monitoring/plugins/mpi/check_clarin_ldap.py
r3242 r3253 14 14 special_plugin_description = "LDAP directory" 15 15 special_plugin_file_name = os.path.basename(__file__) 16 17 16 command_line_parameters = [("-h", "host",), 18 17 ("-b", "bind DN",)] -
monitoring/plugins/mpi/check_lat_cql_endpoint.py
r3242 r3253 9 9 CQL_NAMESPACE = "http://www.loc.gov/zing/srw/" 10 10 11 command_line_parameters = [("-h", "host",), 12 ("-u", "URL",)] 13 11 14 # Warning: check of validity of returned data relies on the XML namespace CQL_NAMESPACE of the returned XML markup. 12 15 13 def special_main_subroutine(host, url=None) : 14 15 if url: 16 UP_URLs = (url,) # X- use frozenset 17 18 else: 19 UP_URLs = ('/',) # X- use frozenset 16 def special_main_subroutine(host, 17 URL = '/') : 18 19 psb.set_trace() 20 UP_URLs = (URL,) # X- use frozenset 20 21 21 22 valid_root_element_tag = "{%s}explainResponse" % (CQL_NAMESPACE) … … 34 35 35 36 if __name__ == "__main__" : 36 generic_tla_monitoring.main(special_main_subroutine) 37 generic_tla_monitoring.main(special_main_subroutine, 38 command_line_parameters = command_line_parameters) -
monitoring/plugins/mpi/generic_tla_monitoring.py
r3246 r3253 169 169 '--bindDN', bindDN, 170 170 "--bindPasswordFile", '/root/LDAP_passwdfile', 171 '(objectClass=CLARINPerson) ,171 '(objectClass=CLARINPerson)', 172 172 'isMemberOf'] 173 173 174 174 # Run OpenDJ's "ldapsearch" command line utility 175 pdb.set_trace()175 #pdb.set_trace() 176 176 177 177 process = subprocess.Popen(command, … … 181 181 stdout, stderr = process.communicate() 182 182 183 print stdout184 print stderr185 186 pdb.set_trace()187 188 if response:183 #print stdout 184 #print stderr 185 186 #pdb.set_trace() 187 188 if process.returncode == 0 : 189 189 return { 190 190 "code" : "OK", … … 301 301 302 302 try : 303 opts = filter(None, getopt.getopt(sys.argv[1:], command_line_parameters_getopt_string))[0] # X- fix other plugins with -u option303 opts = filter(None, getopt.getopt(sys.argv[1:], command_line_parameters_getopt_string))[0] 304 304 except getopt.GetoptError, err : 305 305 usage(command_line_parameters_usage_string) 306 306 else : 307 307 if len(command_line_parameters) == len(opts) : 308 ## main_subroutine_argument_values is based on the argument order of special_main_subroutine(). They are not mapped to the argument names! 309 ## Therefore, command_line_parameters must be in the same order as special_main_subroutine()'s arguments. 308 310 main_subroutine_argument_values = [parameter_value for parameter_name, parameter_value in opts] 309 311 # pdb.set_trace()
Note: See TracChangeset
for help on using the changeset viewer.