Example #1
0
 def __init__(self, name, config, url = "", frequency = 1, timeout = 30, 
             username = None, password = None, match_string = None,
             match_not_string = None, use_regexp = False,
             response_time = 60, valid_http_codes = "200,301,304"):
     Check.__init__(self, name, config)
     self.url = config['url']
     self.name = name
     self.frequency = frequency
     self.timeout = timeout
     self.username = username
     self.password = password
     self.match_string = match_string
     self.match_not_string = match_not_string
     self.use_regexp = use_regexp
     self.response_time = response_time
     self.valid_http_codes = valid_http_codes
Example #2
0
 def __init__(self, name, config):
     Check.__init__(self, name, config)
     self.logger.debug("Initialize webcheck %s %s" % (name, config["url"]))
     self.set_config_default_value("frequency", "5")
     self.set_config_default_value("timeout", "30")
     self.set_config_default_value("response_time", 10)
     self.set_config_default_value("valid_http_codes", "200,301,304") 
     self.set_config_default_value("user_agent", "globcheck") 
     self.set_config_default_value("report_headers", "false") 
     self.set_config_default_value("report_body", "false")
     self.set_config_default_value("cleanup_body", "true") 
     if self.get_config_value("set_headers") != None:
         self.__set_headers = self.get_config_value("set_headers").split("\n")
         for h in self.__set_headers:
             self.logger.debug("set_headers: %s" % h)
     else:
         self.__set_headers = None
     if self.get_config_value("get_headers") != None:
         self.__get_headers = self.get_config_value("get_headers").split(",")
         for h in self.__get_headers:
             self.logger.debug("get_headers: %s" % h)
     else:
         self.__get_headers = None
Example #3
0
 def __init__(self, name, config):
     Check.__init__(self, name, config)
     self.url = config["host"]
     self.frequency = 5
     self.timeout = 1000
Example #4
0
 def __init__(self, name, config):
     Check.__init__(self, name, config)