Using the Zabbix audit log as change evidence
When an auditor or security lead asks who changed a host, template or user in Zabbix and when, the Zabbix audit log is the first place to answer that question. It records create, update and delete operations made through the web interface and API, with the user, time and before and after values for each change. By default it keeps those records for 31 days, so a question about a change made two months ago cannot be answered from the log unless you have made a deliberate retention decision. Check the current housekeeping settings in your own installation before you rely on the log for any audit period, and confirm with your auditor how far back evidence must reach.
Teams need this feature when they must show change control over monitoring configuration: who added a host to a maintenance exception, who disabled an alert action, or who granted a user elevated access. Retention is controlled under Administration > Housekeeping, where the audit log retention period is set. If TimescaleDB is in use, the same screen also offers compression for audit records, which lets you keep older entries for longer at lower storage cost. Verify that compression is available in your deployment and test restoring an old record before you depend on it. Read the Zabbix audit log settings documentation for the exact options in your version.
The audit log does not replace external logging or a SIEM. It lives in the same database as the monitoring data, so a database failure, an accidental purge or a compromised administrator account can affect both the configuration and its history. Where the evidence must be tamper resistant or kept for a fixed compliance period, forward Zabbix events to a central log platform and keep the retention decision in that system. Treat the Zabbix log as a useful local record and plan the external copy as part of the design, not as an afterthought.
Audit log settings and retention options compared
This table compares four ways to keep Zabbix audit records longer than the 31 day default: Zabbix housekeeping, a database schedule you own, export to external storage or a SIEM, and TimescaleDB compression. Read each row for when the option fits, what it adds to storage and operations, and what to confirm before you rely on it for change evidence.
| Option | When it fits | Storage and operations cost | What to confirm |
|---|---|---|---|
| Keep the 31 day default with Zabbix housekeeping | Short investigations and teams that only need recent configuration changes | Lowest effort; no extra storage beyond the default window, but older change records are removed automatically | Whether 31 days meets your change review and assessment period, and who reviews records before they expire |
| Extend retention in the database on your own schedule | Organizations that must keep audit records for a defined period in the Zabbix database | Storage grows with change volume; you own the purge job, backups of the audit tables and restore testing | Your database role can run the job safely, the job is documented and backed up, and Zabbix upgrades do not change the audit table layout you depend on |
| Export or forward records to external storage or a SIEM | Assessors expect records held outside the monitoring platform, or you need central correlation | Requires a log shipping method, storage sizing, transport security and monitoring of the pipeline; the cost is mainly staff time and storage | Which records your exporter captures, how gaps are detected, how integrity is protected, and whether the target retention meets your policy |
| Enable compression under Administration > Housekeeping with TimescaleDB | Teams already running TimescaleDB that want to keep audit history with lower on-disk size | Option appears only when TimescaleDB is used; compression reduces storage but adds setup, a tested rollback path and monitoring of the extension | Your TimescaleDB version is supported for your Zabbix release, compression settings suit your retention period, and restores from compressed data have been tested |
Configuring audit log retention step by step
This sequence confirms your database and retention needs, sets housekeeping so audit records persist as long as your owners require, and proves that changes are recorded before you rely on the log as evidence.
Confirm the database and TimescaleDB status
The platform engineer or DBA checks which database backs the Zabbix server and whether the TimescaleDB extension is installed and in use. This matters because audit log compression only appears in the housekeeping settings when TimescaleDB is used, so the answer decides which options you can configure. Record the database engine, the Zabbix version and the TimescaleDB status in your change record. Done when you can state, in writing, whether compression is available in your environment.
Review current housekeeping settings
A Zabbix administrator with Super admin rights opens Administration > Housekeeping and records the current audit log retention value and any compression settings shown. Note which housekeeping options are enabled for other data types too, since the same screen governs them. Export or screenshot the current state so you have a baseline for comparison. Done when you have a written record of the existing values and can explain what the audit log currently keeps.
Agree retention with audit and legal owners
Security, compliance and legal owners decide how long audit records must be available for investigations, change reviews and any regulatory assessment in your organization. The platform team supplies the database growth and storage impact of the chosen period, based on the current table sizes observed in the database. Confirm with your auditors which period they expect and where the evidence will be pulled from. Done when the retention decision and its owner are documented in the change record.
Configure the retention period
The Zabbix administrator sets the audit log retention value under Administration > Housekeeping to the period agreed in the previous step and saves the change. Where TimescaleDB is in use, also configure the audit log compression option that appears on the same screen, using the values your DBA has validated on a non-production copy. Keep the change in your configuration management record. Done when the saved values match the agreed decision and the screen reflects them after a page reload.
Check that housekeeping runs as expected
After the new settings take effect, the administrator checks the housekeeper behavior using the Zabbix server log and the internal monitoring items your team already tracks for housekeeping. Confirm that the housekeeper runs without errors and that database size changes are in line with the expected trend. If the server log shows housekeeping failures, stop and resolve them before relying on the retention setting. Done when housekeeping runs cleanly through at least one cycle and no errors appear in the logs.
Verify a test change appears in the audit log
A Super admin makes a harmless, labeled test change, such as updating the description of a test host group, then opens Reports or the audit log view and searches for the action. Confirm that the record shows the correct user, time, action type and affected resource. Repeat the test for a system action in your scope, such as a user login, if your audit policy requires it. Done when both test events are visible with the expected details and the test change is reverted and documented.
Document the evidence procedure
The platform team writes a short procedure covering where the audit log is viewed, who can export it, how long records are kept and how compression or purge settings are changed. Store it with the change record and give a copy to the audit owner. Schedule a review after each Zabbix upgrade, since the audit log settings and their location should be confirmed against the documentation for your version. Done when the procedure is approved by the audit owner and linked from your monitoring runbook.
How TimescaleDB compression of audit records works in practice
Audit log compression is the lever that makes longer retention affordable on a TimescaleDB backend, and it is configured under Administration > Housekeeping. The option appears only when the Zabbix database runs on TimescaleDB, so a PostgreSQL installation without the extension will not show it. Check the housekeeping page on your own frontend before writing a retention plan that depends on it, because the setting you need is only visible after the database layer is in place.
Compression changes how old audit records are stored, not what they say. Once compressed, records take less disk space, but queries against them and the way they are read back can behave differently from uncompressed rows, so the audit searches your reviewers run during an assessment should be timed against a compressed sample. Confirm with the Zabbix documentation how the audit log interacts with compression and whether any filter or export you rely on is affected. Do not assume the frontend views behave identically across the compressed and uncompressed portions of the history.
TimescaleDB versions must fall inside the range the installed Zabbix release supports. For Zabbix 7.4 that range is TimescaleDB 2.13 to 2.29, as listed in the Zabbix requirements. Before relying on compression for evidence, run a restore test on a copy of the database, confirm the extension version, apply compression to a copy with records older than your intended threshold, and verify that exports, searches and retention deletes still produce the records an auditor would request. Record the results so the evidence trail covers the retention mechanism itself.
Security and operational risks of audit records
Audit records only help when they survive long enough to be reviewed and cannot be quietly changed by the people they describe. The cards below cover the main ways Zabbix audit data can be lost, altered or exposed, and the controls to put in place for each.
Housekeeping deletes records before review
Audit log entries are removed by housekeeping once they pass the configured retention period, which defaults to 31 days. If your review cycle is monthly or quarterly, records can disappear before anyone reads them. Check the audit log retention setting under Administration > Housekeeping against your review and audit cadence, and document the reason for the value you chose.
Audit log docsAdministrators can alter evidence
Anyone with Super admin rights or direct database access can change or remove audit entries, so the log alone does not prove that nothing was hidden. Limit the number of accounts with Super admin rights, use named accounts instead of shared logins, and restrict who can reach the database host. Treat the database as part of the evidence chain.
No off-system copy of records
Audit records live in the same database as the monitoring data they describe. A failed host, a corrupted table or a compromised server can take both with it. Export or forward audit data to storage the Zabbix administrators cannot write to, such as a separate logging platform or write-once object storage, and confirm the export runs on a schedule you can prove.
Sensitive values in changed fields
Audit entries record the details of configuration changes, so a change to a macro, credential or integration setting can expose a secret in the log itself. Review which fields are captured for your change types, avoid putting plain-text secrets in macros, and move them to a secret store. Restrict who can open the audit views so that exposure is limited.
Audit views limited by role
Access to audit log views follows the user role and its permissions, so a NOC or application user may see less than an administrator. Confirm with a test account that the role you intend for auditors can open the audit log and that operators cannot. Review the role assignments whenever groups change, since over-broad roles quietly widen who sees change history.
Backups shorter than retention
If database backups are kept for fewer days than the audit retention period, you lose the ability to restore older audit history after a failure. Align backup retention with the period your audit obligations require, and test a restore to confirm that audit tables come back intact. Ask your auditors which period they expect before setting either value.
How audit records move from actions to retention
The path starts when a user or an API client changes configuration in the Zabbix frontend or API. The change is written as an audit record in the Zabbix database, which is the only store the audit log reads from. Housekeeping then removes records older than the configured retention period, and the 31 day default is the first setting to check. When TimescaleDB is in use, compression can be turned on under Administration > Housekeeping to reduce how much space older records take. An export to external storage or a SIEM is a separate step you design yourself, so confirm what leaves the database and when.
Audit records flow from actions through housekeeping, with optional compression and export.
Questions teams ask about Zabbix audit log retention
Is the 31 day default audit log retention enough for an audit?
Often it is not, because the default covers only the most recent 31 days of audit records. Audit evidence usually has to show who changed what over a review period, and that period is set by your auditor, your policy and your regulator, not by Zabbix. Start by listing the evidence windows you must answer for, then check whether the default covers the longest one. If it does not, extend retention under Administration > Housekeeping and confirm the new value with your auditor before you rely on it. Keep in mind that longer retention only helps if the records are also exported or stored somewhere that survives a database restore.
How much effort does extending audit log retention take?
The configuration change itself is small. The effort comes from the surrounding decisions: how much storage the audit table will grow into, how long your database backups are kept, whether records must be exported to a central store, and how the change is tested in a non-production copy first. Those tasks are where most of the time goes. Ask any partner to break the work into storage sizing, retention settings, backup and restore testing, export or SIEM forwarding, and documentation for the control owner, and to state which of those are included in the fixed scope.
Can audit log compression work without TimescaleDB?
No. Audit log compression is configured under Administration > Housekeeping and appears only when TimescaleDB is used as the database extension. On a plain PostgreSQL or MySQL backend you will not see the option, so retention has to rely on standard housekeeping and storage planning. If you expect long retention and want compression, confirm the database platform and the TimescaleDB version your Zabbix release supports before you commit to the architecture, because the supported ranges are listed in the Zabbix requirements.
What does the internal team need to provide for this work?
The team needs a named owner for the audit evidence requirement, access to the Zabbix frontend with an administrator account that can change housekeeping settings, and access to the database servers, backup jobs and storage that hold Zabbix data. Someone must also know which logs or SIEM the records must reach, and who approves retention changes. Plan time for those people, because waiting for approvals or access is a common cause of delay in this kind of work. Confirm early who will hold the Super admin credentials used during the change.
Can our own team set up audit log retention in-house?
Yes, for a small installation with a clear retention requirement. The frontend setting is simple, and the Zabbix documentation describes it. The harder parts are sizing storage, proving that backups include the audit data, testing a restore, and documenting the control for auditors. Teams without database or compliance experience often underestimate those steps. A fixed-scope engagement from DeployOpen can cover planning, configuration, testing and evidence preparation, while your team keeps ownership of the platform. Decide which of those tasks you will do yourself before you ask for a quote.
How do Zabbix audit records relate to a SIEM?
Zabbix keeps audit records in its own database for the retention period you configure, and a SIEM is a separate system that stores events for correlation and investigation. Retention inside Zabbix does not replace forwarding events to a SIEM, and a SIEM does not replace the Zabbix audit record as the source of configuration changes. Ask your security team which system is the system of record for change evidence, how records are forwarded, what fields are kept, and how time sources are synchronized so events from both systems line up during an investigation.
What should a quote for audit log retention include?
A useful quote lists the written scope, the Zabbix version and database platform in scope, the retention period the control requires, the storage and backup changes, the restore test, the SIEM or export work, the evidence pack for your control owner, and the items that are excluded. It should also state what is one-time and what recurs, such as storage growth reviews or retention changes after an upgrade. Ask how the partner will verify the setting after each Zabbix upgrade, since housekeeping options can change between releases.
How DeployOpen scopes Zabbix audit log work
DeployOpen treats Zabbix audit log settings and retention as a written scope: which change records you need, where they must be kept, and who reviews them. We build and test the configuration inside your own infrastructure, then hand over documentation your compliance and operations teams can use.
How we scope
- Agree in writing which configuration changes and user actions must be evidenced for your audit.
- Confirm the Zabbix version and database, including whether TimescaleDB is in use, before settings are chosen.
- Record the retention period your auditors or internal policy require, and who approves any change to it.
How we build
- Configure audit log retention under Administration > Housekeeping and document the values set.
- Test whether system actions are recorded for the change types in scope, using controlled test changes.
- Where TimescaleDB is used, configure audit log compression and confirm its effect on stored records.
How we hand over
- Deliver a written configuration record covering retention, logged actions, compression and database location.
- Provide a short procedure for exporting or preserving audit records before housekeeping removes them.
- Walk your operations and compliance staff through how to read audit entries and who may view them.
How we support
- Engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts.
- Ongoing support, upgrades and retesting after Zabbix upgrades are available as a retainer.
- Ask any provider to confirm in writing how audit records are preserved across version upgrades and database changes.

