An inspection task represents the planning and management of inspections for specific component instances. When creating an inspection task, you can specify the component instances that need to be inspected, as well as the inspection cycle and strategy. You can also specify the maximum number of inspection records to retain; any inspection results that exceed this number will be automatically overwritten.
When creating an inspection task, you can use the following command to create it:
<name>
is the resource name of the inspection task; you can set a name that is easy to remember.<namespace>
is the namespace to which the inspection task belongs and is also the target namespace for the inspection. For example, if you want to inspect the component instance mgr1
in the namespace tongrds-1
, you need to set <namespace>
to tongrds-1
.<spec.component>
is used to specify the target component type for the inspection task, such as mysqlcluster
.<spec.instances.name>
is used to specify the target instance name for the inspection task; you can specify multiple instances within the same namespace, or use the wildcard *
to match all instances.<spec.jobsHistoryLimit>
is used to specify the maximum number of inspection records that the current inspection task will retain. Any records that exceed this value will be automatically overwritten.<spec.trigger>
is used to specify the triggering method for the current inspection task, currently supporting Manual
and Schedule
, which represent manual triggering and scheduled triggering, respectively. If set to Schedule
, the following parameter must also be set:
<spec.schedule>
is used to specify the triggering time for the current inspection task, for example, 0 0 1 * *
indicates triggering at 1 AM every day. For more information on scheduled tasks, please refer to Inspection Scheduling Policy.Once the inspection task is created successfully, the backend service will execute the corresponding inspection operations according to the settings of the inspection task. For more information about executing inspections, please refer to Executing Inspection Tasks.