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

Last change on this file since 3555 was 3555, checked in by sanmai, 11 years ago
  • Add plugin for LAT PostgreSQL server.
  • Rework generic HTTP check to allow port number specification.
  • Some renaming/clarification.
  • Property svn:executable set to *
File size: 1.5 KB
Line 
1#!/usr/bin/python2
2
3import generic_tla_monitoring
4import os, pdb, sys, inspect, traceback
5
6
7special_plugin_description = "Lamus"
8special_plugin_file_name = os.path.basename(__file__)
9command_line_parameters = [("-h", "host",),
10                           ("-u", "http_path",)]
11
12
13def special_main_subroutine(host, http_path) :
14
15    http_paths = (http_path,) # X- use frozenset
16   
17    ## Check status for all http_paths.
18    results = \
19        map(lambda http_path : generic_tla_monitoring.check_condition(host                     = host,
20                                                                      http_path                = http_path,
21                                                                      HTTP_method              = 'GET',
22                                                                      port_number              = 80,
23                                                                      authorize                = True,
24                                                                      validator                = generic_tla_monitoring.check_HTML_wellformedness,
25                                                                      special_plugin_file_name = special_plugin_file_name),
26            http_paths)
27   
28    generic_tla_monitoring.nagios_return_complex(results, 
29                                                 reporter = special_plugin_description)
30
31if __name__ == "__main__" :
32    generic_tla_monitoring.main(special_main_subroutine, 
33                                command_line_parameters)
34   
Note: See TracBrowser for help on using the repository browser.