Diagnostics bundle management
Automatically
delete old Ozone logs in S3 by retention, perform scheduled clean up of diagnostics bundles, and
collect the bundle data. By deploying the diagnostics-api-service pod, configure
to schedule the clearing of Ozone logs and thresholds with environment variables.
Environment variable setup
You must set up the Environment variables to perform specific operations.
For clearing the Ozone S3 logs, while the Ozone logging is enabled, old log objects in Ozone S3 buckets can be removed using a configurable retention period. By default, the clean up process runs daily at 3:00 AM (varies according to the timezone) and applies to all environments with Ozone logging enabled.
| Variable | Description |
|---|---|
OZONE_LOG_RETENTION_DAYS |
Specifies the duration (in days) to retain Ozone logs before deletion. |
OZONE_CLEANUP_CRONTAB |
Defines the cron schedule for Ozone S3 log cleanup. This setting overrides the default daily 3:00 AM run if your build uses this trigger for scheduling the job. |
| Variable | Description | Default value |
|---|---|---|
CLEANUP_CRONTAB |
Defines the cron schedule for diagnostic bundle cleanup. |
"0 15 4 * * *" |
COLLECTION_CRONTAB |
Defines the cron schedule for automatic diagnostic bundle collection. |
"0 0 6 * * *" |
CLEANUP_MIN_AVAILABLE_SPACE |
Specifies the minimum free disk space threshold in MB, required before the cleanup operation runs. |
"1000" |
CLEANUP_MAX_BUNDLE_AGE |
Specifies the maximum age of bundles before the cleanup operation (defined as an ISO-8601 duration). |
"P30D" |
Accessing the logs for bundle collection
To review and inspect the running diagnostics bundle collection process, use the diagnostics-api-service pod at the /data-0/logs path.
