示例#1
0
 def _safe_request(self, url, params):
     try:
         response = requests.get(url, params=params)
     except RequestException, e:
         log.warning("Something was wrong with Graphite service")
         log.debug(e)
         return None
示例#2
0
 def _safe_request(self, url, params):
     try:
         response = requests.get(url, params=params)
     except RequestException, e:
         log.warning("Something was wrong with Graphite service")
         log.debug(e)
         return None
示例#3
0
 def test(self):
     # test using the metrics find endpoint
     url = self.configuration.url + '/metrics/find'
     try:
         response = requests.get(url, params={'query': '*'})
     except RequestException, e:
         log.debug('Test failed request error {}'.format(e))
         return False
示例#4
0
 def test(self):
     # test using the metrics find endpoint
     url = self.configuration.url + '/metrics/find'
     try:
         response = requests.get(url, params={'query': '*'})
     except RequestException, e:
         log.debug('Test failed request error {}'.format(e))
         return False