Changeset 3555 for monitoring/plugins/mpi/check_lat_oai_endpoint.py
- Timestamp:
- 09/12/13 15:37:28 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
monitoring/plugins/mpi/check_lat_oai_endpoint.py
r3385 r3555 5 5 6 6 7 special_plugin_description 8 special_plugin_file_name 9 OAI_namespace 7 special_plugin_description = "OAI-PMH endpoint" 8 special_plugin_file_name = os.path.basename(__file__) 9 OAI_namespace = "http://www.openarchives.org/OAI/2.0/" 10 10 command_line_parameters = [("-h", "host",), 11 ("-u", " URL",)]11 ("-u", "http_path",)] 12 12 13 13 # Warning: check of validity of returned data relies on the XML namespace OAI_NAMESPACE of the returned XML markup. 14 14 15 15 def special_main_subroutine(host, 16 URL) :16 http_path) : 17 17 18 UP_URLs = (URL,) # X- use frozenset18 http_paths = (http_path,) # X- use frozenset 19 19 20 20 valid_root_element_tag = "{%s}OAI-PMH" % (OAI_namespace) 21 21 22 # Check status for all UP_URLs. 23 results = map(lambda UP_URL : generic_tla_monitoring.check_condition(host = host, 24 UP_URL = UP_URL, 25 HTTP_method = 'GET', 26 validator = generic_tla_monitoring.check_XML_validity, 27 valid_root_element_tag = valid_root_element_tag, 28 special_plugin_file_name = special_plugin_file_name), 29 UP_URLs) 22 # Check status for all http_paths. 23 results = \ 24 map(lambda http_path : generic_tla_monitoring.check_condition(host = host, 25 http_path = http_path, 26 HTTP_method = 'GET', 27 port_number = 80, 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), 32 http_paths) 30 33 31 34 generic_tla_monitoring.nagios_return_complex(results, reporter = special_plugin_description)
Note: See TracChangeset
for help on using the changeset viewer.