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.5 KB
|
Line | |
---|
1 | #!/usr/bin/python2 |
---|
2 | |
---|
3 | import generic_tla_monitoring |
---|
4 | import os, pdb |
---|
5 | |
---|
6 | |
---|
7 | special_plugin_description = "Handle" |
---|
8 | special_plugin_file_name = os.path.basename(__file__) |
---|
9 | command_line_parameters = [("-h", "host",), |
---|
10 | ("-u", "URL",)] |
---|
11 | |
---|
12 | # Warning: old checking condition "if 300 <= r1.status and r1.status < 400:" X- |
---|
13 | |
---|
14 | def special_main_subroutine(host, URL) : |
---|
15 | #result = test_case(host); |
---|
16 | #result = check_condition(host) |
---|
17 | #generic_tla_monitoring.nagios_return(result['code'], result['message']) |
---|
18 | |
---|
19 | UP_URLs = (URL,) # X- use frozenset |
---|
20 | # /1839/00-0000-0000-0000-0000-4 |
---|
21 | # POST hdl=1839%2F00-0000-0000-0000-0009-4&auth=x&noredirect= |
---|
22 | |
---|
23 | # Check status for all UP_URLs. |
---|
24 | results = \ |
---|
25 | map(lambda UP_URL : generic_tla_monitoring.check_condition(host = 'hdl.handle.net', # X- host |
---|
26 | UP_URL = UP_URL, |
---|
27 | HTTP_method = 'POST', |
---|
28 | validator = generic_tla_monitoring.check_HTML_wellformedness, |
---|
29 | special_plugin_file_name = special_plugin_file_name), |
---|
30 | UP_URLs) |
---|
31 | |
---|
32 | generic_tla_monitoring.nagios_return_complex(results, reporter = special_plugin_description) |
---|
33 | |
---|
34 | if __name__ == "__main__" : |
---|
35 | generic_tla_monitoring.main(special_main_subroutine, |
---|
36 | command_line_parameters) |
---|
37 | |
---|
Note: See
TracBrowser
for help on using the repository browser.