Add delete_outdate_alarm to kapacitor and prometheus

In actual usage scenarios, the expired alarm data should be deleted,
so it is agreed to enable this function for the alarm data source.

Implements: blueprint add-delete-outdate-alarm
Change-Id: I6c34f94961c07b7def4b62787b43d962cbb5a6e1
This commit is contained in:
Q.hongtao 2020-08-29 12:58:29 +08:00
parent 542e659a1f
commit 459b70e0ab
2 changed files with 8 additions and 0 deletions

View File

@ -91,3 +91,7 @@ class KapacitorDriver(AlarmDriverBase):
Not implement yet
"""
return []
@staticmethod
def should_delete_outdated_entities():
return True

View File

@ -421,3 +421,7 @@ class PrometheusDriver(AlarmDriverBase):
@staticmethod
def get_event_types():
return [PROMETHEUS_EVENT_TYPE]
@staticmethod
def should_delete_outdated_entities():
return True