Merge "gnocchi: log on warning level, not exception"
This commit is contained in:
commit
934e2a0b4f
@ -18,7 +18,7 @@ from oslo_log import log
|
|||||||
from oslo_serialization import jsonutils
|
from oslo_serialization import jsonutils
|
||||||
|
|
||||||
from aodh.evaluator import threshold
|
from aodh.evaluator import threshold
|
||||||
from aodh.i18n import _
|
from aodh.i18n import _LW
|
||||||
from aodh import keystone_client
|
from aodh import keystone_client
|
||||||
|
|
||||||
LOG = log.getLogger(__name__)
|
LOG = log.getLogger(__name__)
|
||||||
@ -61,8 +61,9 @@ class GnocchiResourceThresholdEvaluator(GnocchiBase):
|
|||||||
start=start, stop=end,
|
start=start, stop=end,
|
||||||
resource_id=rule['resource_id'],
|
resource_id=rule['resource_id'],
|
||||||
aggregation=rule['aggregation_method'])
|
aggregation=rule['aggregation_method'])
|
||||||
except Exception:
|
except Exception as e:
|
||||||
LOG.exception(_('alarm stats retrieval failed'))
|
LOG.warning(_LW('alarm stats retrieval failed: %s'),
|
||||||
|
e)
|
||||||
return []
|
return []
|
||||||
|
|
||||||
|
|
||||||
@ -73,8 +74,8 @@ class GnocchiAggregationMetricsThresholdEvaluator(GnocchiBase):
|
|||||||
metrics=rule['metrics'],
|
metrics=rule['metrics'],
|
||||||
start=start, stop=end,
|
start=start, stop=end,
|
||||||
aggregation=rule['aggregation_method'])
|
aggregation=rule['aggregation_method'])
|
||||||
except Exception:
|
except Exception as e:
|
||||||
LOG.exception(_('alarm stats retrieval failed'))
|
LOG.warning(_LW('alarm stats retrieval failed: %s'), e)
|
||||||
return []
|
return []
|
||||||
|
|
||||||
|
|
||||||
@ -97,6 +98,6 @@ class GnocchiAggregationResourcesThresholdEvaluator(GnocchiBase):
|
|||||||
aggregation=rule['aggregation_method'],
|
aggregation=rule['aggregation_method'],
|
||||||
needed_overlap=0,
|
needed_overlap=0,
|
||||||
)
|
)
|
||||||
except Exception:
|
except Exception as e:
|
||||||
LOG.exception(_('alarm stats retrieval failed'))
|
LOG.warning(_LW('alarm stats retrieval failed: %s'), e)
|
||||||
return []
|
return []
|
||||||
|
Loading…
x
Reference in New Issue
Block a user