Changeset 4057 for monitoring
- Timestamp:
- 11/19/13 16:11:03 (11 years ago)
- Location:
- monitoring/plugins/mpi
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
monitoring/plugins/mpi/check_clarin_comp_reg.py
r4047 r4057 8 8 special_plugin_file_name = os.path.basename(__file__) 9 9 10 command_line_parameters = [("-h", "host",), 11 ("-u", "URL",), 10 command_line_parameters = [("-s", "scheme"), 11 ("-h", "host",), 12 ("-u", "http_path",), 12 13 ("-p", "port",)] 13 14 14 15 15 def special_main_subroutine(host, 16 def special_main_subroutine(scheme, 17 host, 16 18 http_path, 17 port_number) : 19 port_number) : 18 20 19 21 http_paths = (http_path,) # X- use frozenset -
monitoring/plugins/mpi/check_clarin_discojuice_html.py
r4047 r4057 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 command_line_parameters = [("-s", "scheme"), 10 ("-h", "host",), 11 ("-u", "http_path",), 11 12 ("-p", "port_number",)] 12 13 13 14 14 def special_main_subroutine(host, 15 def special_main_subroutine(scheme, 16 host, 15 17 http_path, 16 port_number) : 18 port_number) : 17 19 18 20 http_paths = (http_path,) -
monitoring/plugins/mpi/check_clarin_discojuice_json.py
r4047 r4057 7 7 special_plugin_description = "Discojuice JSON" 8 8 special_plugin_file_name = os.path.basename(__file__) 9 command_line_parameters = [("-h", "host",), 9 command_line_parameters = [("-s", "scheme"), 10 ("-h", "host",), 10 11 ("-u", "http_path",), 11 12 ("-p", "port_number",)] 12 13 13 14 def special_main_subroutine(host,14 def special_main_subroutine(scheme, 15 host, 15 16 http_path, 16 port_number) : 17 port_number) : 17 18 18 19 http_paths = (http_path,) -
monitoring/plugins/mpi/check_clarin_vlo.py
r4047 r4057 7 7 special_plugin_file_name = os.path.basename(__file__) 8 8 9 command_line_parameters = [("-h", "host",), 9 command_line_parameters = [("-s", "scheme"), 10 ("-h", "host",), 10 11 ("-u", "http_path",), 11 12 ("-p", "port_number",)] 12 13 13 def special_main_subroutine(host, 14 def special_main_subroutine(scheme, 15 host, 14 16 http_path, 15 17 port_number) : … … 21 23 map(lambda http_path : generic_tla_monitoring.check_condition(host = host, 22 24 http_path = http_path, 25 protocol = scheme, 23 26 HTTP_method = "GET", 24 27 port_number = port_number, -
monitoring/plugins/mpi/check_lat_annex.py
r4047 r4057 7 7 special_plugin_description = "Annex" 8 8 special_plugin_file_name = os.path.basename(__file__) 9 command_line_parameters = [("-h", "host",), 9 command_line_parameters = [("-s", "scheme"), 10 ("-h", "host",), 10 11 ("-u", "http_path",), 11 12 ("-p", "port_number",)] 12 13 13 14 14 def special_main_subroutine(host, 15 def special_main_subroutine(scheme, 16 host, 15 17 http_path, 16 18 port_number) : … … 21 23 results = \ 22 24 map(lambda http_path : generic_tla_monitoring.check_condition(host = host, 23 http_path = http_path, 25 http_path = http_path, 26 protocol = scheme, 24 27 HTTP_method = "GET", 25 28 port_number = port_number, -
monitoring/plugins/mpi/check_lat_avatech_clam.py
r4048 r4057 7 7 special_plugin_description = "AVATecH CLAM" 8 8 special_plugin_file_name = os.path.basename(__file__) 9 command_line_parameters = [("-h", "host",), 9 command_line_parameters = [("-s", "scheme"), 10 ("-h", "host",), 10 11 ("-u", "http_path",), 11 12 ("-p", "port_number",)] … … 20 21 ## Check status for all http_paths. 21 22 results = \ 22 map(lambda http_path : generic_tla_monitoring.check_condition(host = host, 23 http_path = http_path, 24 HTTP_method = "GET", 25 port_number = port_number, 26 authorize = True, 27 validator = generic_tla_monitoring.check_XML_validity, 28 valid_root_element_tag = valid_root_element_tag, 29 special_plugin_file_name = special_plugin_file_name), 23 map(lambda http_path : generic_tla_monitoring.check_condition(host = host, 24 http_path = http_path, 25 protocol = scheme, 26 HTTP_method = "GET", 27 port_number = port_number, 28 authorize = True, 29 validator = generic_tla_monitoring.check_XML_validity, 30 valid_root_element_tag = valid_root_element_tag, 31 special_plugin_file_name = special_plugin_file_name), 30 32 http_paths) 31 33 -
monitoring/plugins/mpi/check_lat_cql_endpoint.py
r4047 r4057 8 8 special_plugin_file_name = os.path.basename(__file__) 9 9 CQL_namespace = "http://www.loc.gov/zing/srw/" 10 command_line_parameters = [("-h", "host",), 10 command_line_parameters = [("-s", "scheme"), 11 ("-h", "host",), 11 12 ("-u", "http_path",), 12 13 ("-p", "port_number",)] 13 14 14 15 15 def special_main_subroutine(host, 16 def special_main_subroutine(scheme, 17 host, 16 18 http_path, 17 19 port_number) : … … 26 28 map(lambda http_path : generic_tla_monitoring.check_condition(host = host, 27 29 http_path = http_path, 30 protocol = scheme, 28 31 HTTP_method = 'GET', 29 32 port_number = port_number, -
monitoring/plugins/mpi/check_lat_dobes.py
r4047 r4057 7 7 special_plugin_description = "DoBeS" 8 8 special_plugin_file_name = os.path.basename(__file__) 9 command_line_parameters = [("-h", "host",), 9 command_line_parameters = [("-s", "scheme"), 10 ("-h", "host",), 10 11 ("-u", "http_path",), 11 12 ("-p", "port_number",)] 12 13 13 14 14 def special_main_subroutine(host, 15 def special_main_subroutine(scheme, 16 host, 15 17 http_path, 16 18 port_number) : -
monitoring/plugins/mpi/check_lat_handle.py
r4047 r4057 7 7 special_plugin_description = "Handle" 8 8 special_plugin_file_name = os.path.basename(__file__) 9 command_line_parameters = [("-h", "host",), 9 command_line_parameters = [("-s", "scheme"), 10 ("-h", "host",), 10 11 ("-u", "http_path",), 11 12 ("-p", "port_number",)] … … 14 15 # Warning: old checking condition "if 300 <= r1.status and r1.status < 400:" X- 15 16 16 def special_main_subroutine(host, 17 def special_main_subroutine(scheme, 18 host, 17 19 http_path, 18 20 port_number) : … … 26 28 map(lambda http_path : generic_tla_monitoring.check_condition(host = host, ## Always hdl.handle.net 27 29 http_path = http_path, 30 protocol = scheme, 28 31 HTTP_method = 'POST', 29 32 port_number = port_number, -
monitoring/plugins/mpi/check_lat_imdi.py
r4047 r4057 7 7 special_plugin_description = "IMDI browser" 8 8 special_plugin_file_name = os.path.basename(__file__) 9 command_line_parameters = [("-h", "host",), 9 command_line_parameters = [("-s", "scheme"), 10 ("-h", "host",), 10 11 ("-u", "http_path",), 11 12 ("-p", "port_number",)] 12 13 13 def special_main_subroutine(host, 14 def special_main_subroutine(scheme, 15 host, 14 16 http_path, 15 port_number) : 17 port_number) : 16 18 17 19 http_paths = (http_path,) … … 24 26 ## Check status for all http_paths. 25 27 results = \ 26 map(lambda http_path : generic_tla_monitoring.check_condition(host = host, 27 http_path = http_path, 28 HTTP_method = 'GET', 29 port_number = port_number, 30 authorize = True, 28 map(lambda http_path : generic_tla_monitoring.check_condition(host = host, 29 http_path = http_path, 30 protocol = scheme, 31 HTTP_method = 'GET', 32 port_number = port_number, 33 authorize = True, 31 34 validator = generic_tla_monitoring.check_HTML_wellformedness, 32 35 special_plugin_file_name = special_plugin_file_name), -
monitoring/plugins/mpi/check_lat_lamus.py
r4047 r4057 7 7 special_plugin_description = "Lamus" 8 8 special_plugin_file_name = os.path.basename(__file__) 9 command_line_parameters = [("-h", "host",), 9 command_line_parameters = [("-s", "scheme"), 10 ("-h", "host",), 10 11 ("-u", "http_path",), 11 12 ("-p", "port_number",)] 12 13 13 14 14 def special_main_subroutine(host, 15 def special_main_subroutine(scheme, 16 host, 15 17 http_path, 16 18 port_number) : … … 22 24 map(lambda http_path : generic_tla_monitoring.check_condition(host = host, 23 25 http_path = http_path, 26 protocol = scheme, 24 27 HTTP_method = 'GET', 25 28 port_number = port_number, -
monitoring/plugins/mpi/check_lat_lexus.py
r4047 r4057 7 7 special_plugin_description = "Lexus" 8 8 special_plugin_file_name = os.path.basename(__file__) 9 command_line_parameters = [("-h", "host",), 9 command_line_parameters = [("-s", "scheme"), 10 ("-h", "host",), 10 11 ("-u", "http_path",), 11 12 ("-p", "port_number",)] 12 13 13 14 14 def special_main_subroutine(host, 15 def special_main_subroutine(scheme, 16 host, 15 17 http_path, 16 18 port_number) : … … 22 24 map(lambda http_path : generic_tla_monitoring.check_condition(host = host, 23 25 http_path = http_path, 26 protocol = scheme, 24 27 HTTP_method = 'GET', 25 28 port_number = port_number, -
monitoring/plugins/mpi/check_lat_oai_endpoint.py
r4047 r4057 8 8 special_plugin_file_name = os.path.basename(__file__) 9 9 OAI_namespace = "http://www.openarchives.org/OAI/2.0/" 10 command_line_parameters = [("-h", "host",), 10 command_line_parameters = [("-s", "scheme"), 11 ("-h", "host",), 11 12 ("-u", "http_path",), 12 13 ("-p", "port_number",)] … … 27 28 http_path = http_path, 28 29 HTTP_method = 'GET', 30 protocol = scheme, 29 31 port_number = port_number, 30 32 authorize = True, -
monitoring/plugins/mpi/check_lat_postgresql.py
r4047 r4057 7 7 special_plugin_description = "LAT PostgreSQL database server" 8 8 special_plugin_file_name = os.path.basename(__file__) 9 command_line_parameters = [("-h", "host",), 9 command_line_parameters = [("-s", "scheme"), 10 ("-h", "host",), 10 11 ("-u", "http_path",), 11 12 ("-p", "port_number")] 12 13 13 14 14 def special_main_subroutine(host, 15 http_path, 15 def special_main_subroutine(scheme, 16 host, 17 http_path, 16 18 port_number) : 17 19 … … 22 24 map(lambda http_path : generic_tla_monitoring.check_condition(host = host, 23 25 http_path = http_path, 26 protocol = scheme, 24 27 HTTP_method = "GET", 25 28 port_number = port_number, -
monitoring/plugins/mpi/check_lat_www.py
r4047 r4057 7 7 special_plugin_description = "TLA WWW" 8 8 special_plugin_file_name = os.path.basename(__file__) 9 command_line_parameters = [("-h", "host",), 9 command_line_parameters = [("-s", "scheme"), 10 ("-h", "host",), 10 11 ("-u", "http_path",), 11 12 ("-p", "port_number",)] 12 13 13 14 14 def special_main_subroutine(host, 15 def special_main_subroutine(scheme, 16 host, 15 17 http_path, 16 18 port_number) : … … 22 24 map(lambda http_path : generic_tla_monitoring.check_condition(host = host, 23 25 http_path = http_path, 26 protocol = scheme, 24 27 HTTP_method = "GET", 25 28 port_number = port_number, -
monitoring/plugins/mpi/generic_tla_monitoring.py
r4056 r4057 261 261 return result 262 262 263 263 264 def check_condition(host, 264 http_path, 265 http_path, 266 protocol, 265 267 HTTP_method, 266 268 port_number, … … 294 296 timestamp = datetime.datetime.today().isoformat() 295 297 296 try : 297 conn = httplib.HTTPConnection(host = host, 298 port = port_number, 299 strict = True) # X- accomodate https? 300 298 try : 299 if protocol = 'http' : 300 conn = httplib.HTTPConnection(host = host, 301 port = port_number, 302 strict = True) 303 elif protocol = 'https' : 304 conn = httplib.HTTPSConnection(host = host, 305 port = port_number, 306 strict = True) 301 307 request = conn.request(HTTP_method, 302 308 http_path) … … 352 358 353 359 parsed_new_location_URL = urlparse.urlparse(new_location_URL) 354 355 360 356 if host == parsed_new_location_URL.netloc and http_path == parsed_new_location_URL.path :361 if parsed_new_location_URL.scheme == protocol and host == parsed_new_location_URL.netloc and http_path == parsed_new_location_URL.path : 357 362 return { 358 363 "code" : "CRITICAL", … … 364 369 return check_condition(host = parsed_new_location_URL.netloc, 365 370 http_path = parsed_new_location_URL.path, 371 protocol = parsed_new_location_URL.scheme, 366 372 HTTP_method = HTTP_method, 367 373 port_number = port_number, -
monitoring/plugins/mpi/plugins_hosts_services.tab
r4047 r4057 1 file name description - h protocol-u -b -d -p2 check_lat_cql_endpoint.py CQL endpoint cqlservlet.mpi.nl http'/' 803 check_lat_avatech_clam.py AVATecH CLAM catalog.clarin.eu http'/avatech/avatech_iais_fine_segmentation' 804 check_lat_lexus.py Lexus corpus1.mpi.nl http'/mpi/lexusDojo/' 805 check_lat_lamus.py Lamus corpus1.mpi.nl http'/jkc/lamus/lamusstart.jsp' 806 check_lat_imdi.py IMDI browser [staging] lux17.mpi.nl http'/ds/imdi_browser/viewcontroller?request=view&nodeid=MPI299144%23' 807 check_lat_imdi.py IMDI browser [production] corpus1.mpi.nl http'/ds/imdi_browser/viewcontroller?request=view&nodeid=MPI299144%23' 808 check_lat_handle.py Handle h dl.handle.net http'/?hdl=1839%2F00-0000-0000-0000-0000-4&auth=x' 809 check_lat_annex.py Annex corpus1.mpi.nl http'/ds/annex/runLoader?nodeid=MPI600401%23' 8010 check_lat_oai_endpoint.py OAI-PMH corpus1.mpi.nl http'/ds/oaiprovider/oai2?verb=Identify' 8011 check_clarin_saml.py SAML infra.clarin.eu https'/aai/clarin-sp-metadata.xml' /srv/www/infra.clarin.eu/ 8012 check_clarin_discojuice_html.py Discojuice HTML 1 catalog.clarin.eu http'/mw1/sds/discojuice' 8013 check_clarin_discojuice_html.py Discojuice HTML 2 catalog.clarin.eu http'/mw2/sds/discojuice'14 check_clarin_discojuice_json.py Discojuice JSON 1 catalog.clarin.eu http'/discojuice/metadata_clarin1.json' 8015 check_clarin_discojuice_json.py Discojuice JSON 2 catalog.clarin.eu http'/discojuice/metadata_clarin2.json' 8016 check_clarin_vlo.py Virtual Language Observatory catalog.clarin.eu http'/vlo/'17 check_clarin_comp_reg.py Component Registry catalog.clarin.eu http'/ds/ComponentRegistry/' 8018 check_clarin_ldap.py LDAP directory user.clarin.eu ldap 'cn=Directory Manager' 8019 check_lat_dobes.py DoBeS dobes.mpi.nl http '/' 8020 check_lat_postgresql.py LAT PostgreSQL database server lux08.mpi.nl http'/rest/' 89841 file name description -s -h -u -b -d -p 2 check_lat_cql_endpoint.py http CQL endpoint cqlservlet.mpi.nl '/' 80 3 check_lat_avatech_clam.py http AVATecH CLAM catalog.clarin.eu '/avatech/avatech_iais_fine_segmentation' 80 4 check_lat_lexus.py Lexus http corpus1.mpi.nl '/mpi/lexusDojo/' 80 5 check_lat_lamus.py Lamus http corpus1.mpi.nl '/jkc/lamus/lamusstart.jsp' 80 6 check_lat_imdi.py IMDI browser [staging] http lux17.mpi.nl '/ds/imdi_browser/viewcontroller?request=view&nodeid=MPI299144%23' 80 7 check_lat_imdi.py IMDI browser [production] http corpus1.mpi.nl '/ds/imdi_browser/viewcontroller?request=view&nodeid=MPI299144%23' 80 8 check_lat_handle.py Handle http hdl.handle.net '/?hdl=1839%2F00-0000-0000-0000-0000-4&auth=x' 80 9 check_lat_annex.py Annex http corpus1.mpi.nl '/ds/annex/runLoader?nodeid=MPI600401%23' 80 10 check_lat_oai_endpoint.py OAI-PMH http corpus1.mpi.nl '/ds/oaiprovider/oai2?verb=Identify' 80 11 check_clarin_saml.py SAML https infra.clarin.eu '/aai/clarin-sp-metadata.xml' /srv/www/infra.clarin.eu/ 80 12 check_clarin_discojuice_html.py Discojuice HTML 1 http catalog.clarin.eu '/mw1/sds/discojuice' 80 13 check_clarin_discojuice_html.py Discojuice HTML 2 http catalog.clarin.eu '/mw2/sds/discojuice' 14 check_clarin_discojuice_json.py Discojuice JSON 1 http catalog.clarin.eu '/discojuice/metadata_clarin1.json' 80 15 check_clarin_discojuice_json.py Discojuice JSON 2 http catalog.clarin.eu '/discojuice/metadata_clarin2.json' 80 16 check_clarin_vlo.py Virtual Language Observatory http catalog.clarin.eu '/vlo/' 17 check_clarin_comp_reg.py Component Registry http catalog.clarin.eu '/ds/ComponentRegistry/' 80 18 check_clarin_ldap.py LDAP directory http user.clarin.eu ldap 'cn=Directory Manager' 80 19 check_lat_dobes.py DoBeS http dobes.mpi.nl http '/' 80 20 check_lat_postgresql.py LAT PostgreSQL database server http lux08.mpi.nl '/rest/' 8984
Note: See TracChangeset
for help on using the changeset viewer.