Changeset 3270
- Timestamp:
- 08/06/13 14:16:15 (11 years ago)
- Location:
- monitoring/plugins/mpi
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
monitoring/plugins/mpi/check_clarin_discojuice_html.py
r3242 r3270 7 7 special_plugin_description = "Discojuice HTML" 8 8 special_plugin_file_name = os.path.basename(__file__) 9 command_line_parameters = [("-h", "host",), 10 ("-u", "URL",)] 9 11 10 def special_main_subroutine(host) :11 12 12 UP_URLs = ('/mw1/sds/discojuice', 13 '/mw2/sds/discojuice',) # X- use frozenset 13 def special_main_subroutine(host, URL) : 14 15 UP_URLs = (URL,) 14 16 15 17 # Check status for all UP_URLs. … … 26 28 27 29 if __name__ == "__main__" : 28 generic_tla_monitoring.main(special_main_subroutine) 30 generic_tla_monitoring.main(special_main_subroutine, 31 command_line_parameters) -
monitoring/plugins/mpi/check_clarin_discojuice_json.py
r3242 r3270 4 4 import os, pdb 5 5 6 6 7 special_plugin_description = "Discojuice JSON" 7 8 special_plugin_file_name = os.path.basename(__file__) 9 command_line_parameters = [("-h", "host",), 10 ("-u", "URL",)] 8 11 9 12 10 def special_main_subroutine(host ) :11 UP_URLs = ("/discojuice/metadata_clarin1.json", 12 "/discojuice/metadata_clarin2.json",)13 def special_main_subroutine(host, URL) : 14 15 UP_URLs = (URL,) 13 16 14 17 # Check status for all UP_URLs. … … 25 28 26 29 if __name__ == "__main__" : 27 generic_tla_monitoring.main(special_main_subroutine) 30 generic_tla_monitoring.main(special_main_subroutine, 31 command_line_parameters) -
monitoring/plugins/mpi/check_lat_annex.py
r3043 r3270 7 7 special_plugin_description = "Annex" 8 8 special_plugin_file_name = os.path.basename(__file__) 9 command_line_parameters = [("-h", "host",), 10 ("-u", "URL",)] 9 11 10 def special_main_subroutine(host) :11 12 12 UP_URLs = ("/ds/annex/runLoader?nodeid=MPI600401%23",) # X- use frozenset 13 def special_main_subroutine(host, URL) : 14 15 UP_URLs = (URL,) # X- use frozenset 13 16 14 17 # Check status for all UP_URLs. … … 23 26 24 27 if __name__ == "__main__" : 25 generic_tla_monitoring.main(special_main_subroutine) 28 generic_tla_monitoring.main(special_main_subroutine, 29 command_line_parameters) -
monitoring/plugins/mpi/check_lat_avatech_clam.py
r3243 r3270 7 7 special_plugin_description = "AVATecH CLAM" 8 8 special_plugin_file_name = os.path.basename(__file__) 9 command_line_parameters = [("-h", "host",), 10 ("-u", "URL",)] 9 11 10 def special_main_subroutine(host ) :12 def special_main_subroutine(host, URL) : 11 13 12 UP_URLs = ( '/avatech/avatech_iais_fine_segmentation',) # X- use frozenset14 UP_URLs = (URL,) # X- use frozenset 13 15 14 16 # Check status for all UP_URLs. … … 25 27 26 28 if __name__ == "__main__" : 27 generic_tla_monitoring.main(special_main_subroutine) 29 generic_tla_monitoring.main(special_main_subroutine, 30 command_line_parameters) -
monitoring/plugins/mpi/check_lat_cql_endpoint.py
r3263 r3270 8 8 special_plugin_file_name = os.path.basename(__file__) 9 9 CQL_NAMESPACE = "http://www.loc.gov/zing/srw/" 10 11 10 command_line_parameters = [("-h", "host",), 12 11 ("-u", "URL",)] -
monitoring/plugins/mpi/check_lat_handle.py
r3043 r3270 7 7 special_plugin_description = "Handle" 8 8 special_plugin_file_name = os.path.basename(__file__) 9 command_line_parameters = [("-h", "host",), 10 ("-u", "URL",)] 9 11 10 12 # Warning: old checking condition "if 300 <= r1.status and r1.status < 400:" X- 11 13 12 def special_main_subroutine(host ) :14 def special_main_subroutine(host, URL) : 13 15 #result = test_case(host); 14 16 #result = check_condition(host) 15 17 #generic_tla_monitoring.nagios_return(result['code'], result['message']) 16 18 17 UP_URLs = ( '/?hdl=1839%2F00-0000-0000-0000-0000-4&auth=x',) # X- use frozenset19 UP_URLs = (URL,) # X- use frozenset 18 20 # /1839/00-0000-0000-0000-0000-4 19 21 # POST hdl=1839%2F00-0000-0000-0000-0009-4&auth=x&noredirect= … … 31 33 32 34 if __name__ == "__main__" : 33 generic_tla_monitoring.main(special_main_subroutine) 35 generic_tla_monitoring.main(special_main_subroutine, 36 command_line_parameters) 34 37 -
monitoring/plugins/mpi/check_lat_imdi.py
r3043 r3270 7 7 special_plugin_description = "IMDI browser" 8 8 special_plugin_file_name = os.path.basename(__file__) 9 command_line_parameters = [("-h", "host",), 10 ("-u", "URL",)] 9 11 10 def special_main_subroutine(host ) :12 def special_main_subroutine(host, URL) : 11 13 12 UP_URLs = ( '/ds/imdi_browser/viewcontroller?request=view&nodeid=MPI299144%23',)14 UP_URLs = (URL,) 13 15 #UP_URLs_encoded = urllib.parse.quote_plus() 14 16 … … 30 32 31 33 if __name__ == "__main__" : 32 generic_tla_monitoring.main(special_main_subroutine) 34 generic_tla_monitoring.main(special_main_subroutine, 35 command_line_parameters) -
monitoring/plugins/mpi/check_lat_lamus.py
r3043 r3270 5 5 6 6 7 special_plugin_description = "Lamus" 8 special_plugin_file_name = os.path.basename(__file__) 7 special_plugin_description = "Lamus" 8 special_plugin_file_name = os.path.basename(__file__) 9 command_line_parameters = [("-h", "host",), 10 ("-u", "URL",)] 9 11 10 def special_main_subroutine(host) :11 12 12 UP_URLs = ('/jkc/lamus/lamusstart.jsp',) # X- use frozenset 13 def special_main_subroutine(host, URL) : 14 15 UP_URLs = (URL,) # X- use frozenset 13 16 14 17 # Check status for all UP_URLs. 15 results 16 17 18 19 20 18 results = map(lambda UP_URL : generic_tla_monitoring.check_condition(host = host, 19 UP_URL = UP_URL, 20 HTTP_method = 'GET', 21 validator = generic_tla_monitoring.check_HTML_wellformedness, 22 special_plugin_file_name = special_plugin_file_name), 23 UP_URLs) 21 24 22 generic_tla_monitoring.nagios_return_complex(results, reporter = special_plugin_description) 25 generic_tla_monitoring.nagios_return_complex(results, 26 reporter = special_plugin_description) 23 27 24 28 if __name__ == "__main__" : 25 generic_tla_monitoring.main(special_main_subroutine) 29 generic_tla_monitoring.main(special_main_subroutine, 30 command_line_parameters) 26 31 -
monitoring/plugins/mpi/integration_test.R
r3043 r3270 7 7 header = TRUE); 8 8 9 arg_sets <-9 command_line_arguments <- 10 10 base:::paste(test_info$Nagios.plugin, "-h", test_info$host); 11 command_line_arguments <- c(command_line_arguments, 12 test_info[,5L:ncol(test_info)]); 11 13 12 ## test_results has a value equal to the exit status of the scripts with arguments arg_sets run.14 ## test_results has a value equal to the exit status of the scripts with arguments command_line_arguments run. 13 15 14 16 test_results <- 15 base:::integer(length = base:::length( arg_sets));17 base:::integer(length = base:::length(command_line_arguments)); 16 18 test_stdout <- 17 base:::character(length = base:::length( arg_sets));19 base:::character(length = base:::length(command_line_arguments)); 18 20 #test_stderr 19 # <- character(length = length( arg_sets));21 # <- character(length = length(command_line_arguments)); 20 22 ## X- stderr output cannot be caught separately yet due to R implementation issue 21 23 22 for (test_index in 1L:base:::length( arg_sets))24 for (test_index in 1L:base:::length(command_line_arguments)) 23 25 { 24 26 base:::message(base:::paste0("Running test ", test_index)); 25 27 26 28 arg_set <- 27 arg_sets[test_index];29 command_line_arguments[test_index]; 28 30 29 31 test_output <- … … 43 45 44 46 test_stdout[test_index] <- 45 base:::paste0(test_output, sep = "\n", collapse = "\n"); 47 base:::paste0(test_output, 48 sep = "\n", 49 collapse = "\n"); 46 50 47 51 # browser(); … … 49 53 50 54 test_results_df <- 51 base:::data.frame(description = test_info$service,52 arg_sets = arg_sets,53 test_results = test_results,54 test_stdout = test_stdout,55 stringsAsFactors = FALSE);55 base:::data.frame(description = test_info$service, 56 command_line_arguments = command_line_arguments, 57 test_results = test_results, 58 test_stdout = test_stdout, 59 stringsAsFactors = FALSE); 56 60 57 61 test_results_file_path <- -
monitoring/plugins/mpi/plugins_hosts_services.tab
r3263 r3270 11 11 check_lat_oai_endpoint.py OAI-PMH corpus1.mpi.nl http '/ds/oaiprovider/oai2?verb=Identify' 12 12 check_clarin_saml.py SAML www.clarin.eu https 13 check_clarin_discojuice_json.py Discojuice JSON catalog.clarin.eu http '/mw1/sds/discojuice'; '/mw2/sds/discojuice' 14 check_clarin_discojuice_html.py Discojuice HTML catalog.clarin.eu http '/discojuice/metadata_clarin1.json'; '/discojuice/metadata_clarin2.json' 13 check_clarin_discojuice_json.py Discojuice JSON catalog.clarin.eu http '/mw1/sds/discojuice' 14 check_clarin_discojuice_json.py Discojuice JSON catalog.clarin.eu http '/mw2/sds/discojuice' 15 check_clarin_discojuice_html.py Discojuice HTML catalog.clarin.eu http '/discojuice/metadata_clarin1.json' 16 check_clarin_discojuice_html.py Discojuice HTML catalog.clarin.eu http '/discojuice/metadata_clarin2.json' 15 17 check_lat_avatech_clam.py AVATecH CLAM lux17.mpi.nl http '/avatech/avatech_iais_fine_segmentation' 16 18 check_clarin_ldap.py LDAP directory user.clarin.eu ldap
Note: See TracChangeset
for help on using the changeset viewer.