Skip to content

Commit

Permalink
Adding documentation on automatic purge
Browse files Browse the repository at this point in the history
  • Loading branch information
georgweiss committed Jan 30, 2024
1 parent 2295dbe commit 996f455
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions services/alarm-logger/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 996f455

Please sign in to comment.