Graylog: Configure the retention policy
This documentation is part of the Handle retention guide. View the full guide here: How to configure log retention.
👋 Welcome to Stackhero documentation
Stackhero provides a fully managed Graylog cloud solution designed for speed and simplicity. You can:
- Rely on an unlimited, dedicated SMTP email server included with your service.
- Apply updates effortlessly with a single click, with no manual intervention needed.
- Use a custom domain name secured by HTTPS (for example, https://logs.your-company.com), giving your team secure, direct access.
- Experience strong performance and security on a private, dedicated infrastructure with no shared resources or noisy neighbors.
Focus on your data, not your tooling: you can get started with Stackhero's Graylog cloud hosting solution in just a few minutes.
To configure the retention policy, navigate to the Graylog interface. Under "System" select "Indices" and click the "Edit" button in the "Default index set".
In the example below, the configuration sets a maximum of 27 indices, with each index retaining 14 days of logs. This setup retains logs for approximately a year (378 days).
We do not recommend keeping more than 14 days of messages per index.
Retention configuration to keep logs for a year
When choosing "Index time" as a rotation policy, you need to define the duration using the ISO8601 Duration standard.
For example, "P7D" means 7 days, "P14D" means 14 days and so on.