Changeset 3562 for monitoring
- Timestamp:
- 09/12/13 18:45:38 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
monitoring/plugins/mpi/generic_tla_monitoring.py
r3561 r3562 203 203 # print 'process id:', os.getpid() 204 204 205 def LDAP_query(OpenDJ_uid, command, LDAP_result_queue): 205 def LDAP_query(OpenDJ_uid, command, LDAP_result_queue) : 206 207 pdb.set_trace() 208 206 209 try : 207 210 os.setuid(OpenDJ_uid) … … 221 224 222 225 223 LDAP_result_queue = multiprocessing.Queue()224 LDAP_query_process = multiprocessing.Process(target = LDAP_query, args = (OpenDJ_uid, command, LDAP_result_queue))225 LDAP_query_process.start()226 # LDAP_result_queue = multiprocessing.Queue() 227 # LDAP_query_process = multiprocessing.Process(target = LDAP_query, args = (OpenDJ_uid, command, LDAP_result_queue)) 228 # LDAP_query_process.start() 226 229 result = LDAP_result_queue.get() 227 LDAP_query_process.join() 228 230 # LDAP_query_process.join() 231 232 LDAP_query(OpenDJ_uid, command, LDAP_result_queue) 229 233 230 234 if result == True: 231 235 return { "code" : "OK", 232 "message" : 'Host %s is up and responds as expected to a query "%s" with base DN "%s".' % (host, query, base_DN)233 }236 "message" : 'Host %s is up and responds as expected to a query "%s" with base DN "%s".' % (host, query, base_DN) 237 } 234 238 else : 235 239 return { "code" : "CRITICAL", 236 237 240 "message" : 'Host %s is not up or does not respond as expected to a query "%s" with base DN "%s".' % (host, query, base_DN) 241 } 238 242 239 243 # current_process_ID = os.fork() … … 249 253 # os.waitpid(current_process_ID, 0) 250 254 251 try :252 os.setuid(Nagios_uid)253 except OSError, e :254 raise e255 # try : 256 # os.setuid(Nagios_uid) 257 # except OSError, e : 258 # raise e 255 259 256 260 #print stdout
Note: See TracChangeset
for help on using the changeset viewer.