Use a playbook, script, or command to update incident fields.
You can update alert fields by running the setAlert and setAlertStatus commands in the CLI, in a script, or a playbook task.
Note
In the CLI, you can also set and update incident fields using the setParentIncidentFields command. However, the setParentIncidentFields command does not support updating incident fields that use a grid format.
setAlert: Sets values for specific alert fields. The supported fields are presented in the list of arguments.Example 62. Examples of the setAlert command in the CLIThe following examples show how to run the
setAlertcommand in the CLI. You can run CLI commands in the War Room. When you start typing the CLI provides the available options and if you select an enum field, the CLI provides the available values.To change the alert severity to
high, run!setAlert severity=high
To change the alert severity to
highand star the alert, run!setAlert severity=high starred=true
setAlertStatus: Sets the status or resolution value for an alert. This command supports thestatusargument, which presents a list of status and resolution type values. The selected status is set in thecustom_statusfield.If you specify a resolution status, the alert is closed and the
resolution_statusandcloseReasonfields are updated to the same value as thecustom_statusfield. If you specify a New, Reopened, or Under Investigation status, the alert remains open and theresolution_statusandcloseReasonfields are empty.Tip
You can create custom alert statuses and resolution reasons, and use the
setAlertStatuscommand to set these custom statuses for alerts.For example, when a user starts investigating an alert, the alert status is automatically changed from New to Under Investigation. In some cases, it is useful to create an interim status, such as Triage. After you create the custom status, the new status will be available for selection. To create a custom status, follow the instructions in Create custom incident statuses and resolution reasons.
Example 63. Examples of using the setAlertStatus command in the CLIThe following examples show how to run the
setAlertStatuscommand in the CLI. You can run CLI commands in the War Room. When you start typing, the CLI provides the available options and if you select an enum field, the CLI provides the available values.To change the alert status to
Resolved - Known Issue, run!setAlertStatus status="Resolved - Known Issue"
To change the alert status to custom status
Triage, run!setAlertStatus status=Triage
Note
You must create a custom status before you can select it.
Example 64. Example of using the setAlertStatus command in a playbookThe following example shows how the
setAlertStatuscommand can be used in a playbook task. In this example, the task sets a custom alert status (Triage). The custom alert status was created before setting up the playbook.