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
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