Bugfix: return the correct start/end timestamp in Prometheus datasource
Change-Id: Ie7d0b3606c9c835d459bda96b9fb455dfa4e0f05 Depends-On: I78b9d21c0a61833967810cd98c2026f69e8f00f6
This commit is contained in:
parent
efb2a039e7
commit
d4172030c2
@ -42,9 +42,10 @@ class PrometheusLabels(object):
|
||||
|
||||
|
||||
def get_alarm_update_time(alarm):
|
||||
return alarm.get(PrometheusAlertProperties.ENDS_AT) if \
|
||||
PrometheusAlertProperties.ENDS_AT in alarm else \
|
||||
alarm.get(PrometheusAlertProperties.STARTS_AT)
|
||||
if PrometheusAlertStatus.FIRING == alarm.get(PrometheusProperties.STATUS):
|
||||
return alarm.get(PrometheusAlertProperties.STARTS_AT)
|
||||
else:
|
||||
return alarm.get(PrometheusAlertProperties.ENDS_AT)
|
||||
|
||||
|
||||
def get_annotation(alarm, annotation):
|
||||
|
Loading…
Reference in New Issue
Block a user