Last change
on this file since 2195 was
2195,
checked in by sanmai, 12 years ago
|
- Add monitoring plugin for AVATecH CLAM.
- Done main work refactoring the plugins. Now there is a generic plugin module, with special extensions for each plugin. Less code, easier for addition of new plugins, better maintainable,
wider coverage of error handling and logging. Only the AVATecH CLAM and Discojuice JSON and HTML plugin were refactored thus far.
- Change checks for Discojuice as requested.
|
File size:
1.1 KB
|
Line | |
---|
1 | #!/usr/bin/python |
---|
2 | |
---|
3 | import generic_tla_monitoring |
---|
4 | import os, pdb |
---|
5 | #import xml.etree.ElementTree |
---|
6 | |
---|
7 | |
---|
8 | special_plugin_description = "Discojuice JSON" |
---|
9 | special_plugin_file_name = os.path.basename(__file__) |
---|
10 | |
---|
11 | def special_main_subroutine(host) : |
---|
12 | UP_URLs = ("/discojuice/metadata_clarin1.json", "/discojuice/metadata_clarin2.json",) |
---|
13 | |
---|
14 | # Check status for all UP_URLs. |
---|
15 | results = map(lambda UP_URL : generic_tla_monitoring.check_condition(host = host, |
---|
16 | UP_URL = UP_URL, |
---|
17 | validator = generic_tla_monitoring.check_JSON_wellformedness, |
---|
18 | special_plugin_file_name = special_plugin_file_name), |
---|
19 | UP_URLs) |
---|
20 | |
---|
21 | generic_tla_monitoring.nagios_return_complex(results, reporter = special_plugin_description) |
---|
22 | |
---|
23 | if __name__ == "__main__" : |
---|
24 | generic_tla_monitoring.main(special_main_subroutine) |
---|
Note: See
TracBrowser
for help on using the repository browser.