Changeset 2019
- Timestamp:
- 07/10/12 12:11:48 (12 years ago)
- Location:
- monitoring/plugins/mpi
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
monitoring/plugins/mpi/check_clarin_comp_reg.py
r1998 r2019 19 19 """ 20 20 nagios_return('UNKNOWN', 21 "usage: {0} -h host".format(sys.argv[0]))21 "usage: %s -h host" % (sys.argv[0])) 22 22 23 23 def nagios_return(code, response): -
monitoring/plugins/mpi/check_clarin_vlo.py
r1998 r2019 6 6 7 7 nagios_codes = { 8 'OK' : 0,9 'WARNING' : 1,10 'CRITICAL' : 2,11 'UNKNOWN' : 3,12 'DEPENDENT' : 413 }8 'OK' : 0, 9 'WARNING' : 1, 10 'CRITICAL' : 2, 11 'UNKNOWN' : 3, 12 'DEPENDENT' : 4 13 } 14 14 15 15 def usage(): … … 18 18 usage() calls nagios_return() 19 19 """ 20 nagios_return('UNKNOWN', "usage: {0} -h host".format(sys.argv[0]))20 nagios_return('UNKNOWN', "usage: %s -h host" % (sys.argv[0])) 21 21 22 22 def nagios_return(code, response): … … 40 40 conn.close() 41 41 42 if r1.status == 200 :42 if r1.status == 200 : 43 43 return { "code" : "OK", "message" : 'Host %s, service %s is up.' % (host, DESCRIPTION) } 44 44 else: … … 51 51 """ 52 52 53 if len(sys.argv) < 2 :53 if len(sys.argv) < 2 : 54 54 usage() 55 55 -
monitoring/plugins/mpi/check_lat_annex.py
r1737 r2019 4 4 5 5 nagios_codes = {'OK': 0, 6 'WARNING': 1, 7 'CRITICAL': 2, 8 'UNKNOWN': 3, 9 'DEPENDENT': 4} 6 'WARNING': 1, 7 'CRITICAL': 2, 8 'UNKNOWN': 3, 9 'DEPENDENT': 4 10 } 10 11 11 12 def usage(): … … 15 16 """ 16 17 nagios_return('UNKNOWN', 17 "usage: {0} -h host".format(sys.argv[0]))18 "usage: %s -h host" % (sys.argv[0])) 18 19 19 20 def nagios_return(code, response): -
monitoring/plugins/mpi/check_lat_cql_endpoint.py
r1998 r2019 23 23 """ 24 24 nagios_return('UNKNOWN', 25 "usage: {0} -h host".format(sys.argv[0]))25 "usage: %s -h host" % (sys.argv[0])) 26 26 27 27 def nagios_return(code, response) : … … 35 35 36 36 def check_response_data_validity(data) : 37 data_tree_root_element = xml.etree.ElementTree.XML(text = data) 38 39 valid_root_element_tag = "{%s}explainResponse" % (CQL_NAMESPACE) 40 41 if data_tree_root_element.tag == valid_root_element_tag : 42 return True 37 try : 38 data_tree_root_element = xml.etree.ElementTree.XML(text = data) 39 40 valid_root_element_tag = "{%s}explainResponse" % (CQL_NAMESPACE) 41 42 if data_tree_root_element.tag == valid_root_element_tag : 43 return True 43 44 44 return False 45 return False 46 except : 47 return False 45 48 46 49 def check_condition(host) : … … 64 67 return { 65 68 "code" : "OK", 66 "message" : 'Host %s, service %s is up and returns valid data.' % (host, DESCRIPTION)69 "message" : 'Host %s, service %s is up and returns well-formed and probably valid data.' % (host, DESCRIPTION) 67 70 } 68 71 else : 69 72 return { 70 73 "code" : "CRITICAL", 71 "message" : 'Host %s, service %s is up but returns invalid data!' % (host, DESCRIPTION)74 "message" : 'Host %s, service %s is up but returns non-well-formed or invalid data.' % (host, DESCRIPTION) 72 75 } 73 76 -
monitoring/plugins/mpi/check_lat_handle.py
r1737 r2019 4 4 5 5 nagios_codes = {'OK': 0, 6 'WARNING': 1, 7 'CRITICAL': 2, 8 'UNKNOWN': 3, 9 'DEPENDENT': 4} 6 'WARNING': 1, 7 'CRITICAL': 2, 8 'UNKNOWN': 3, 9 'DEPENDENT': 4 10 } 10 11 11 12 def usage(): … … 15 16 """ 16 17 nagios_return('UNKNOWN', 17 "usage: {0} -h host".format(sys.argv[0]))18 "usage: %s -h host" % (sys.argv[0])) 18 19 19 20 def nagios_return(code, response): -
monitoring/plugins/mpi/check_lat_imdi.py
r1737 r2019 4 4 5 5 nagios_codes = {'OK': 0, 6 'WARNING': 1, 7 'CRITICAL': 2, 8 'UNKNOWN': 3, 9 'DEPENDENT': 4} 6 'WARNING': 1, 7 'CRITICAL': 2, 8 'UNKNOWN': 3, 9 'DEPENDENT': 4 10 } 10 11 11 12 def usage(): … … 15 16 """ 16 17 nagios_return('UNKNOWN', 17 "usage: {0} -h host".format(sys.argv[0]))18 "usage: %s -h host" % (sys.argv[0])) 18 19 19 20 def nagios_return(code, response): -
monitoring/plugins/mpi/check_lat_lamus.py
r1737 r2019 3 3 import sys, getopt, httplib 4 4 5 nagios_codes = {'OK': 0, 6 'WARNING': 1, 7 'CRITICAL': 2, 8 'UNKNOWN': 3, 9 'DEPENDENT': 4} 5 nagios_codes = { 6 'OK': 0, 7 'WARNING': 1, 8 'CRITICAL': 2, 9 'UNKNOWN': 3, 10 'DEPENDENT': 4 11 } 10 12 11 13 def usage(): … … 15 17 """ 16 18 nagios_return('UNKNOWN', 17 "usage: {0} -h host".format(sys.argv[0]))19 "usage: %s -h host" % (sys.argv[0])) 18 20 19 21 def nagios_return(code, response): … … 27 29 28 30 def check_condition(host): 29 conn = httplib.HTTPConnection(host)30 conn.request("GET", "/jkc/lamus/lamusstart.jsp")31 r1 = conn.getresponse()31 conn = httplib.HTTPConnection(host) 32 conn.request("GET", "/jkc/lamus/lamusstart.jsp") 33 r1 = conn.getresponse() 32 34 conn.close() 33 35 if r1.status == 200: -
monitoring/plugins/mpi/check_lat_lexus.py
r1737 r2019 4 4 5 5 nagios_codes = {'OK': 0, 6 'WARNING': 1, 7 'CRITICAL': 2, 8 'UNKNOWN': 3, 9 'DEPENDENT': 4} 6 'WARNING': 1, 7 'CRITICAL': 2, 8 'UNKNOWN': 3, 9 'DEPENDENT': 4 10 } 10 11 11 12 def usage(): … … 15 16 """ 16 17 nagios_return('UNKNOWN', 17 "usage: {0} -h host".format(sys.argv[0]))18 "usage: %s -h host" % (sys.argv[0])) 18 19 19 20 def nagios_return(code, response): -
monitoring/plugins/mpi/plugins_hosts_services.tab
r1997 r2019 8 8 check_lat_handle.py Handle corpus1.mpi.nl 9 9 check_lat_annex.py Annex corpus1.mpi.nl 10 check_lat_oai_endpoint.py OAI-PMH corpus1.mpi.nl 11 check_clarin_saml.py SAML www.clarin.eu
Note: See TracChangeset
for help on using the changeset viewer.