Ignore:
Timestamp:
08/06/13 14:16:15 (11 years ago)
Author:
sanmai
Message:
  • Adapt monitoring plugins to new command line argument processing.
  • Fix MPI monitoring checks table so that every check is on a separate line.
File:
1 edited

Legend:

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

    r3043 r3270  
    55
    66
    7 special_plugin_description      = "Lamus"
    8 special_plugin_file_name        = os.path.basename(__file__)
     7special_plugin_description = "Lamus"
     8special_plugin_file_name = os.path.basename(__file__)
     9command_line_parameters = [("-h", "host",),
     10                           ("-u", "URL",)]
    911
    10 def special_main_subroutine(host) :
    1112
    12     UP_URLs          = ('/jkc/lamus/lamusstart.jsp',) # X- use frozenset
     13def special_main_subroutine(host, URL) :
     14
     15    UP_URLs = (URL,) # X- use frozenset
    1316   
    1417    # Check status for all UP_URLs.
    15     results          = map(lambda UP_URL : generic_tla_monitoring.check_condition(host          = host,
    16                                                                                   UP_URL        = UP_URL,
    17                                                                                   HTTP_method   = 'GET',
    18                                                                                   validator     = generic_tla_monitoring.check_HTML_wellformedness,
    19                                                                                   special_plugin_file_name = special_plugin_file_name),
    20                            UP_URLs)
     18    results = map(lambda UP_URL : generic_tla_monitoring.check_condition(host          = host,
     19                                                                         UP_URL        = UP_URL,
     20                                                                         HTTP_method   = 'GET',
     21                                                                         validator     = generic_tla_monitoring.check_HTML_wellformedness,
     22                                                                         special_plugin_file_name = special_plugin_file_name),
     23                  UP_URLs)
    2124   
    22     generic_tla_monitoring.nagios_return_complex(results, reporter = special_plugin_description)
     25    generic_tla_monitoring.nagios_return_complex(results,
     26                                                 reporter = special_plugin_description)
    2327
    2428if __name__ == "__main__" :
    25     generic_tla_monitoring.main(special_main_subroutine)
     29    generic_tla_monitoring.main(special_main_subroutine,
     30                                command_line_parameters)
    2631   
Note: See TracChangeset for help on using the changeset viewer.