Changeset 3284 for monitoring


Ignore:
Timestamp:
08/06/13 15:10:26 (11 years ago)
Author:
sanmai
Message:
  • Fix monitoring plugin.
File:
1 edited

Legend:

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

    r3243 r3284  
    88special_plugin_file_name        = os.path.basename(__file__)
    99OAI_NAMESPACE                   = "http://www.openarchives.org/OAI/2.0/"
     10command_line_parameters = [("-h", "host",),
     11                           ("-u", "URL",)]
    1012
    1113# Warning: check of validity of returned data relies on the XML namespace OAI_NAMESPACE of the returned XML markup.
    1214
    13 def special_main_subroutine(host, url=None) :
     15def special_main_subroutine(host,
     16                            URL) :
    1417
    15     if url:
    16         OAI_URL = url
    17         UP_URLs = (url,) # X- use frozenset
    18        
    19     else:
    20         OAI_URL = '/ds/oaiprovider/oai2'
    21         UP_URLs = (OAI_URL + '?verb=Identify',) # X- use frozenset
     18    UP_URLs = (URL,) # X- use frozenset
    2219
    2320    valid_root_element_tag  = "{%s}OAI-PMH" % ("http://www.openarchives.org/OAI/2.0/")
     
    3532
    3633if __name__ == "__main__" :
    37     generic_tla_monitoring.main(special_main_subroutine)
     34    generic_tla_monitoring.main(special_main_subroutine,
     35                                command_line_parameters)
Note: See TracChangeset for help on using the changeset viewer.