Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 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