diff --git a/services/alarm-logger/doc/index.rst b/services/alarm-logger/doc/index.rst index f825904256..a23dca6833 100644 --- a/services/alarm-logger/doc/index.rst +++ b/services/alarm-logger/doc/index.rst @@ -32,3 +32,19 @@ Examples: * **Commands** e.g. a user actions to *Acknowledge* an alarm + +**************************************** +Automatic purge of Elasticsearch indices +**************************************** + +To avoid issues related to a high number of Elasticsearch indices, automatic purge can be enabled in order to delete +indices considered obsolete. This is done by setting the preference ``retention_period_days`` to a number larger +or equal to 100. The default value is 0, i.e. automatic purge is disabled by default. + +The automatic purge is run using a cron expression defined in preference ``purge_cron_expr``, default is +``0 0 0 * * SUN``, i.e. midnight each Sunday. See the SpringDocumentation_ on how to define the cron expression. + +An Elasticsearch index is considered eligible for deletion if the last inserted message date is before current time +minus ``retention_period_days``. + +.. _SpringDocumentation: https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/scheduling/support/CronExpression.html \ No newline at end of file