This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.9.4. Troubleshooting the log curator
You can use information in this section for debugging log curation. Curator is used to remove data that is in the Elasticsearch index format prior to OpenShift Container Platform 4.5, and will be removed in a later release.
9.4.1. Troubleshooting log curation 复制链接链接已复制到粘贴板!
You can use information in this section for debugging log curation. For example, if curator is in a failed state, but the log messages do not provide a reason, you could increase the log level and trigger a new job, instead of waiting for another scheduled run of the cron job.
Prerequisites
- Cluster logging and Elasticsearch must be installed.
Procedure
To enable the Curator debug log and trigger next Curator iteration manually:
Enable debug log of Curator:
oc set env cronjob/curator CURATOR_LOG_LEVEL=DEBUG CURATOR_SCRIPT_LOG_LEVEL=DEBUG
$ oc set env cronjob/curator CURATOR_LOG_LEVEL=DEBUG CURATOR_SCRIPT_LOG_LEVEL=DEBUG
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Specify the log level:
- CRITICAL. Curator displays only critical messages.
- ERROR. Curator displays only error and critical messages.
- WARNING. Curator displays only error, warning, and critical messages.
- INFO. Curator displays only informational, error, warning, and critical messages.
DEBUG. Curator displays only debug messages, in addition to all of the above.
The default value is INFO.
注意Cluster logging uses the OpenShift Container Platform custom environment variable
CURATOR_SCRIPT_LOG_LEVEL
in OpenShift Container Platform wrapper scripts (run.sh
andconvert.py
). The environment variable takes the same values asCURATOR_LOG_LEVEL
for script debugging, as needed.
Trigger next curator iteration:
oc create job --from=cronjob/curator <job_name>
$ oc create job --from=cronjob/curator <job_name>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Use the following commands to control the cron job:
Suspend a cron job:
oc patch cronjob curator -p '{"spec":{"suspend":true}}'
$ oc patch cronjob curator -p '{"spec":{"suspend":true}}'
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Resume a cron job:
oc patch cronjob curator -p '{"spec":{"suspend":false}}'
$ oc patch cronjob curator -p '{"spec":{"suspend":false}}'
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Change a cron job schedule:
oc patch cronjob curator -p '{"spec":{"schedule":"0 0 * * *"}}'
$ oc patch cronjob curator -p '{"spec":{"schedule":"0 0 * * *"}}'
1 Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 1
- The
schedule
option accepts schedules in cron format.