Changeset 4047 for monitoring/plugins/mpi/check_lat_oai_endpoint.py
- Timestamp:
- 11/19/13 11:13:07 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
monitoring/plugins/mpi/check_lat_oai_endpoint.py
r4043 r4047 9 9 OAI_namespace = "http://www.openarchives.org/OAI/2.0/" 10 10 command_line_parameters = [("-h", "host",), 11 ("-u", "http_path",)] 11 ("-u", "http_path",), 12 ("-p", "port_number",)] 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 http_path) : 16 http_path, 17 port_number) : 17 18 18 19 http_paths = (http_path,) # X- use frozenset 19 20 21 ## Warning: check of validity of returned data relies on the XML namespace OAI_NAMESPACE of the returned XML markup. 20 22 valid_root_element_tag = "{%s}OAI-PMH" % (OAI_namespace) 21 23 22 if host.count(':') == 1: 23 host, port = host.split(':') 24 else: 25 port = 80 26 # Check status for all http_paths. 24 ## Check status for all http_paths. 27 25 results = \ 28 26 map(lambda http_path : generic_tla_monitoring.check_condition(host = host, 29 27 http_path = http_path, 30 28 HTTP_method = 'GET', 31 port_number = port ,29 port_number = port_number, 32 30 authorize = True, 33 31 validator = generic_tla_monitoring.check_XML_validity, … … 36 34 http_paths) 37 35 38 generic_tla_monitoring.nagios_return_complex(results, reporter = special_plugin_description) 36 generic_tla_monitoring.nagios_return_complex(results, 37 reporter = special_plugin_description) 39 38 40 39 if __name__ == "__main__" :
Note: See TracChangeset
for help on using the changeset viewer.