source: monitoring/plugins/mpi/check_lat_lamus.py @ 3270

Last change on this file since 3270 was 3270, checked in by sanmai, 11 years ago
  • Adapt monitoring plugins to new command line argument processing.
  • Fix MPI monitoring checks table so that every check is on a separate line.
  • Property svn:executable set to *
File size: 1.2 KB
Line 
1#!/usr/bin/python2
2
3import generic_tla_monitoring
4import os, pdb
5
6
7special_plugin_description = "Lamus"
8special_plugin_file_name = os.path.basename(__file__)
9command_line_parameters = [("-h", "host",),
10                           ("-u", "URL",)]
11
12
13def special_main_subroutine(host, URL) :
14
15    UP_URLs = (URL,) # X- use frozenset
16   
17    # Check status for all 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)
24   
25    generic_tla_monitoring.nagios_return_complex(results, 
26                                                 reporter = special_plugin_description)
27
28if __name__ == "__main__" :
29    generic_tla_monitoring.main(special_main_subroutine, 
30                                command_line_parameters)
31   
Note: See TracBrowser for help on using the repository browser.