> For the complete documentation index, see [llms.txt](https://ghoulsec.gitbook.io/ghoulsec-vault/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ghoulsec.gitbook.io/ghoulsec-vault/security-operations/zabbix-nms/zabbix-housekeeping.md).

# Zabbix Housekeeping

The **Zabbix Housekeeper** is a background process in Zabbix that automatically manages and cleans up old data from the database to ensure optimal performance and prevent the database from growing uncontrollably.

#### Key Functions of the Zabbix Housekeeper:

1. **Data Cleanup**: The housekeeper deletes old data based on the configured retention periods (such as history, trends, events, and logs).
2. **Maintains Database Size**: By removing unnecessary or outdated data, it helps prevent the database from becoming too large, which could affect Zabbix’s performance.
3. **Configurable**: You can set retention periods for different types of data, like history, trends, and events. This allows you to control how long data is stored before it’s purged.
4. **Scheduled Task**: The housekeeper runs automatically at regular intervals (defined in the Zabbix configuration) to clean up the database. This task is generally performed during low-traffic periods to minimize impact on performance.

***

#### General Recommendations:

* **Short-Term Data (1–30 days)**: For event data, service data, network discovery, and autoregistration data. This data is often not needed long-term unless you're troubleshooting.
* **Medium-Term Data (30–90 days)**: History data and user session data can typically be kept for 30 to 90 days, offering a good balance between operational review and storage constraints.
* **Long-Term Data (365 days or more)**: Trend data, service data, audit logs, and trigger data (for long-term analysis) should generally be kept for a year or more if necessary for compliance or deeper analysis.

***

<figure><img src="/files/LFd0ONKGwFj70diTjvyb" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ghoulsec.gitbook.io/ghoulsec-vault/security-operations/zabbix-nms/zabbix-housekeeping.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
