Parameterization of cassandra gc logging rotation
Change-Id: Ibc0d81ab721cdc926d872d828b9d08d97e2b840d
Closes-Bug: PROD-15778
diff --git a/metadata/service/database/cassandra_log_cleanup.yml b/metadata/service/database/cassandra_log_cleanup.yml
new file mode 100644
index 0000000..d73980e
--- /dev/null
+++ b/metadata/service/database/cassandra_log_cleanup.yml
@@ -0,0 +1,12 @@
+parameters:
+ _param:
+ opencontrail_cassandra_gc_log_cleanup_mtime: '+7'
+ opencontrail_cassandra_gc_log_cleanup_dir: '/var/log/cassandra/'
+ linux:
+ system:
+ job:
+ cassandra_gc_logs_cleanup:
+ command: "find ${_param:opencontrail_cassandra_gc_log_cleanup_dir} -name 'gc-*.log' -type f -mtime ${_param:opencontrail_cassandra_gc_log_cleanup_mtime} -exec rm {} \\;"
+ identifier: cassandra_gc_logs_cleanup
+ hour: 0
+ minute: 0