Add events and alarm history expiration period
Change-Id: I1af50764f3519a7f6db35de024ac0da95e20c156
Related-Prod: https://mirantis.jira.com/browse/PROD-21307
diff --git a/aodh/server/cluster.yml b/aodh/server/cluster.yml
index d1f6583..fb6839b 100644
--- a/aodh/server/cluster.yml
+++ b/aodh/server/cluster.yml
@@ -6,13 +6,15 @@
parameters:
_param:
openstack_event_alarm_topic: alarm.all
+ # Keep alarm history in database for 30 days
+ aodh_alarm_history_ttl: 2592000
aodh:
server:
enabled: true
role: ${_param:openstack_node_role}
version: ${_param:aodh_version}
cluster: true
- ttl: 86400
+ ttl: ${_param:aodh_alarm_history_ttl}
debug: false
verbose: true
region: ${_param:openstack_region}
@@ -45,3 +47,8 @@
- host: ${_param:openstack_message_queue_node01_address}
- host: ${_param:openstack_message_queue_node02_address}
- host: ${_param:openstack_message_queue_node03_address}
+ # Check for expired alarm history every day at 2 AM
+ expirer:
+ cron:
+ minute: 0
+ hour: 2
diff --git a/aodh/server/single.yml b/aodh/server/single.yml
index b2a55a6..6fec2a6 100644
--- a/aodh/server/single.yml
+++ b/aodh/server/single.yml
@@ -3,10 +3,18 @@
parameters:
_param:
openstack_event_alarm_topic: alarm.all
+ # Keep alarm history in database for 30 days
+ aodh_alarm_history_ttl: 2592000
aodh:
server:
+ ttl: ${_param:aodh_alarm_history_ttl}
role: ${_param:openstack_node_role}
region: ${_param:openstack_region}
event_alarm_topic: ${_param:openstack_event_alarm_topic}
identity:
region: ${_param:openstack_region}
+ # Check for expired alarm history every day at 2 AM
+ expirer:
+ cron:
+ minute: 0
+ hour: 2
diff --git a/panko/server/cluster.yml b/panko/server/cluster.yml
index e277c30..d641f36 100644
--- a/panko/server/cluster.yml
+++ b/panko/server/cluster.yml
@@ -9,9 +9,12 @@
panko_memcached_node01_address: ${_param:cluster_node01_address}
panko_memcached_node02_address: ${_param:cluster_node02_address}
panko_memcached_node03_address: ${_param:cluster_node03_address}
+ # Keep events in database for 30 days
+ panko_event_time_to_live: 2592000
panko:
server:
role: ${_param:openstack_node_role}
+ event_time_to_live: ${_param:panko_event_time_to_live}
identity:
host: ${_param:openstack_control_address}
database:
@@ -24,4 +27,9 @@
- host: ${_param:panko_memcached_node02_address}
port: 11211
- host: ${_param:panko_memcached_node03_address}
- port: 11211
\ No newline at end of file
+ port: 11211
+ # Check for expired events every day at 2 AM
+ expirer:
+ cron:
+ minute: 0
+ hour: 2
\ No newline at end of file
diff --git a/panko/server/single.yml b/panko/server/single.yml
new file mode 100644
index 0000000..497b21e
--- /dev/null
+++ b/panko/server/single.yml
@@ -0,0 +1,16 @@
+classes:
+- service.panko.server.single
+- system.apache.server.site.panko
+parameters:
+ _param:
+ # Keep events in database for 30 days
+ panko_event_time_to_live: 2592000
+ panko:
+ server:
+ role: ${_param:openstack_node_role}
+ event_time_to_live: ${_param:panko_event_time_to_live}
+ # Check for expired events every day at 2 AM
+ expirer:
+ cron:
+ minute: 0
+ hour: 2
\ No newline at end of file