housekeeping_get
Retrieve Zabbix cleanup settings to review automatic data retention periods for history, trends, events, alerts, sessions, and audit logs. Use it to inspect cleanup configuration.
Instructions
Get housekeeping settings. Returns the global configuration that controls automatic cleanup of old data: history storage period, trend storage period, event and alert retention, session cleanup interval, and audit log retention. This is a singleton object.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| output | No | Properties of the housekeeping object to return. Pass 'extend' for all, 'count' for the number of matches only, or a comma-separated list of property names. Default when omitted: 'extend'. Properties: compress_older, compression_status, db_extension, hk_audit, hk_audit_mode, hk_events_autoreg, hk_events_discovery, hk_events_internal, hk_events_mode, hk_events_service (6.0+), hk_events_trigger, hk_history, hk_history_global, hk_history_mode, hk_services, hk_services_mode, hk_sessions, hk_sessions_mode, hk_trends, hk_trends_global, hk_trends_mode. | |
| server | No | Target Zabbix server. Available: default. Defaults to 'default' if omitted. | |
| raw_json | No | Strips the security disclaimer preamble from the response so it is pure JSON. Default: false. Requires the bearer token to have 'allow_raw_json' explicitly enabled by an operator in the admin portal - tokens without that policy receive a PolicyError instead. WARNING: setting true bypasses the prompt-injection mitigation marker that wraps untrusted Zabbix data (host names, item descriptions, problem text). LLM clients (Claude, GPT, Cursor, ...) should leave this false; only programmatic non-LLM consumers (Python scripts, n8n workflows that json.loads the result) should set true. | |
| extra_params | No | Other native housekeeping.get parameters, merged into the request as-is. housekeeping.get has no parameters beyond the typed ones. Any other key is refused here, because Zabbix would silently ignore it. For a parameter you are sure exists on your release but is not listed, use zabbix_raw_api_call. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |