Ignore:
Timestamp:
11/19/13 11:13:07 (11 years ago)
Author:
sanmai
Message:
  • Make port_number specified as command line parameter. For simplicity, there is no

default value anymore, for now.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • monitoring/plugins/mpi/check_lat_handle.py

    r3555 r4047  
    88special_plugin_file_name = os.path.basename(__file__)
    99command_line_parameters = [("-h", "host",),
    10                            ("-u", "http_path",)]
     10                           ("-u", "http_path",),
     11                           ("-p", "port_number",)]
    1112IMDI_namespace = "http://www.mpi.nl/IMDI/Schema/IMDI"
    1213
    1314# Warning: old checking condition "if 300 <= r1.status and r1.status < 400:" X-
    1415
    15 def special_main_subroutine(host, http_path) :
    16     #result = test_case(host);
    17     #result = check_condition(host)
    18     #generic_tla_monitoring.nagios_return(result['code'], result['message'])
     16def special_main_subroutine(host,
     17                            http_path,
     18                            port_number) :
    1919
    2020    valid_root_element_tag = "{%s}METATRANSCRIPT" % (IMDI_namespace)
    2121
    2222    http_paths = (http_path,) # X- use frozenset
    23     # /1839/00-0000-0000-0000-0000-4
    24     # POST hdl=1839%2F00-0000-0000-0000-0009-4&auth=x&noredirect=
    2523   
    26     # Check status for all http_paths.
     24    ## Check status for all http_paths.
    2725    results = \
    28         map(lambda http_path : generic_tla_monitoring.check_condition(host                      = 'hdl.handle.net', # X- host
    29                                                                       http_path                 = http_path,
    30                                                                       HTTP_method               = 'POST',
    31                                                                       port_number               = 80,
    32                                                                       authorize                 = True,
     26        map(lambda http_path : generic_tla_monitoring.check_condition(host                      = host, ## Always hdl.handle.net
     27                                                                      http_path                 = http_path, 
     28                                                                      HTTP_method               = 'POST', 
     29                                                                      port_number               = port_number,
     30                                                                      authorize                 = True, 
    3331                                                                      validator                 = generic_tla_monitoring.check_XML_validity,
    3432                                                                      valid_root_element_tag    = valid_root_element_tag,                                                                 
Note: See TracChangeset for help on using the changeset viewer.