Updated on 2025-09-17 GMT+08:00

Handling an Incident

Scenarios

Once an incident is handled and the cause is found, you can quickly run the contingency plan, script, or job to fix the issue and record the details.

You can view the associated raw alarms in the incident details for the incident whose source is alarm.

Executing a Contingency Plan

  1. Log in to COC.
  2. In the navigation pane, choose Fault Management > Incidents.
  3. On the Pending tab page, select the target incident ticket and click its title.
  4. Select a value for the contingency plan.

    • If you select Contingency Plans, select the corresponding contingency plan from the drop-down list box and click Execute Contingency Plan.

      Go to 5.

      If there is no desired contingency plan, click Create. For details, see Creating a Custom Contingency Plan.

    • If you select Scripts, select the desired script from the drop-down list and click Execute Contingency Plan.

      Go to 7.

      If there is no desired script, click Create Scripts. For details, see Creating a Custom Script.

    • If you select Jobs, select the desired job from the drop-down list and click Execute Contingency Plan.

      Go to 8.

      If there is no desired job, click Create jobs. For details, see Creating Custom Jobs.

  5. Confirm the steps for contingency plan and click OK.
  6. Check the task type associated with the contingency plan.

    • If the task type is Scripts, go to 7.
    • If the task type is Jobs, go to 8.

  7. Set the execution script.

    • Script Input Parameters: The parameter name and default value have been preset when you import a custom script.
    • Executed By: root is set by default. It is the user who executes the script on a target instance node.
    • Timeout Interval: 300 is set by default. It indicates the timeout interval for executing the script on a single target instance.
    • Target Instance: Click Add and set Select Instance.
      Table 1 Instance parameters

      Parameter

      Description

      Example Value

      Selection Method

      Select an instance selection method.

      • Manual Selection: Manually select an instance based on Enterprise Project, View Type, Resource Type, Region, and Target Instance.

      Manual Selection

      Enterprise Project

      Select an enterprise project from the drop-down list. You can choose All.

      All

      View Type

      Select a view type.

      • CloudCMDB resources: Select an instance from the resource list.
      • CloudCMDB application groups: Select an instance from the application group list.

      CloudCMDB resources

      Resource Type

      The value can be ECS or BMS.

      ECS

      Region

      Select a region from the drop-down list.

      CN-Hong Kong

      Target Instance

      Set filter criteria in the filter box and select the filtered instances.

      -

    • Batch Policy: Select Automatic, Manual, or No Batch.
      • Automatic: The selected instances you want to execute are automatically divided into multiple batches based on the preset rule.
      • Manual: You can manually create multiple batches and add instances to each batch as required.
      • No Batch: All instances will be executed in the same batch.
    • Suspension Policy:
      • You can set the execution success rate. If the number of failed hosts meets or exceeds this rate, the service ticket status changes to abnormal, and the ticket stops executing.
      • The success rate ranges from 0 to 100 and is accurate to one decimal place.

      Skip step 8 and perform step 9.

  8. Set parameters for executing a job.

    • Region: Select the region where the target instance is located.
    • Target Instance Mode: Select the execution mode of job step and target instances.
      • Consistent for all steps: All tasks are executed on the selected instance using the same batch policy.
      • Unique for each step: Tasks in one step are executed on the selected instance. Each step uses a batch policy.
      • Unique for each task: Set the target instance and batch policy for each task.
    • Job Execution Procedure: Customize job details.
      • Click the job name. The Modifying Parameters drawer is displayed on the right.
      • Set Input, Output, and Troubleshooting.
    • Target Instance: Click Add and set Select Instance.
      Table 2 Instance parameters

      Parameter

      Description

      Example Value

      Selection Method

      Select an instance selection method.

      • Manual Selection: Manually select an instance based on Enterprise Project, View Type, Resource Type, Region, and Target Instance.

      Manual Selection

      Enterprise Project

      Select an enterprise project from the drop-down list. You can choose All.

      All

      View Type

      Select a view type.

      • CloudCMDB resources: Select an instance from the resource list.
      • CloudCMDB application groups: Select an instance from the application group list.

      CloudCMDB resources

      Resource Type

      The value can be ECS or BMS.

      ECS

      Region

      The default parameter cannot be modified and is determined by Region in Execution Content.

      CN-Hong Kong

      Target Instance

      Set filter criteria in the filter box and select the filtered instances.

      -

    • Batch Policy: Select Automatic, Manual, or No Batch.
      • Automatic: The selected instances you want to execute are automatically divided into multiple batches based on the preset rule.
      • Manual: You can manually create multiple batches and add instances to each batch as required.
      • No Batch: All instances will be executed in the same batch.

  9. Click OK.
  10. Perform the following operations to check whether a service ticket execution is complete.

    • For the service tickets that are being executed:
      • If you want to pause the next batch when the current batch is executed, click Pause in the upper right corner.
      • If you want to continue the paused batch, click Continue in the upper right corner.
      • If you want to stop the service ticket that is about to be executed or is abnormal, click Forcibly End.
    • For the service tickets that are executed:
      • If some or all instance tasks in the service tickets are executed abnormally:
        1. Click the Abnormal tab in the Execution Information area. Locate an abnormal batch and click Retry in the Operation column.
        2. Click the Abnormal tab in the Execution Information area. Locate an abnormal batch and click Cancel in the Operation column.
      • If all instance tasks in the service tickets are executed successfully, no more operation is needed.

Setting Incident Handling Details

  1. Log in to COC.
  2. In the navigation pane, choose Fault Management > Incidents.
  3. On the Pending tab page, select the target incident ticket and click its title.
  4. Click Handle Incident in the upper right corner and set parameters.

    Table 3 Parameters for handling incidents

    Parameter

    Description

    Incident Category

    (Mandatory) Select an incident category from the drop-down list.

    Service Interrupted

    (Mandatory) The options are Yes and No.

    Fault Occurred

    Enter the time when the fault occurs.

    This parameter is mandatory when Service Interrupted is set to Yes.

    Delimited Completion Time

    Enter the issue or fault locating completion time.

    Fault Recovery Time

    Enter the fault recovery time.

    This parameter is mandatory when Service Interrupted is set to Yes.

    Cause

    Enter the cause for the incident.

    Solution

    Enter the solution for the incident.

    Add File

    Click Add File to upload incident-related attachments.

    You can upload maximum of 10 files, each no more than 10 MB. Only the following file formats are supported: JPG, PNG, DOCX, TXT, and PDF.

  5. Click OK.

    Incident handling details are set.