source: monitoring/plugins/mpi/check_clarin_discojuice_html.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 = "Discojuice HTML"
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,)
16   
17    # Check status for all UP_URLs.
18    results = \
19        map(lambda UP_URL : generic_tla_monitoring.check_condition(host                      = host,
20                                                                   UP_URL                    = UP_URL,
21                                                                   HTTP_method               = "GET",
22                                                                   validator                 = generic_tla_monitoring.check_HTML_wellformedness,
23                                                                   special_plugin_file_name  = special_plugin_file_name),
24                  UP_URLs)   
25   
26    generic_tla_monitoring.nagios_return_complex(results, 
27                                                 reporter = special_plugin_description)
28
29if __name__ == "__main__" :
30    generic_tla_monitoring.main(special_main_subroutine, 
31                                command_line_parameters)
Note: See TracBrowser for help on using the repository browser.