source: monitoring/plugins/mpi/check_lat_avatech_clam.py @ 4048

Last change on this file since 4048 was 4048, checked in by sanmai, 11 years ago
  • Small unsaved change.
  • Property svn:executable set to *
File size: 1.7 KB
Line 
1#!/usr/bin/python2
2
3import generic_tla_monitoring
4import os, pdb
5
6
7special_plugin_description = "AVATecH CLAM"
8special_plugin_file_name = os.path.basename(__file__)
9command_line_parameters = [("-h", "host",),
10                           ("-u", "http_path",),
11                           ("-p", "port_number",)]
12valid_root_element_tag = "clam"
13
14def special_main_subroutine(host, 
15                            http_path,
16                            port_number) : 
17
18    http_paths = (http_path,) # X- use frozenset
19   
20    ## Check status for all http_paths.
21    results = \
22        map(lambda http_path : generic_tla_monitoring.check_condition(host                   = host,
23                                                                   http_path                 = http_path,
24                                                                   HTTP_method               = "GET", 
25                                                                   port_number               = port_number,
26                                                                   authorize                 = True,
27                                                                   validator                 = generic_tla_monitoring.check_XML_validity,
28                                                                   valid_root_element_tag    = valid_root_element_tag,
29                                                                   special_plugin_file_name  = special_plugin_file_name),
30          http_paths)   
31   
32    generic_tla_monitoring.nagios_return_complex(results, 
33                                                 reporter = special_plugin_description)
34
35if __name__ == "__main__" :
36    generic_tla_monitoring.main(special_main_subroutine, 
37                                command_line_parameters)
Note: See TracBrowser for help on using the repository browser.