Create scripts to perform specific actions in Cortex XSIAM Cortex XSIAM when the SLA is breached. Properties in the timer field value.
Scripts in Cortex XSIAM enable you to automate processes. You can create scripts that will perform specific actions when a timer field times out. Scripts used with timers must have the SLA tag.
You can use an out-of-the-box or custom script and attach it to an timer alert field.
A common use of scripts for timer fields is to send an email when a timer is breached. You can create a custom script that sends an email to specific users when the script is triggered. You can add this to any timer alert field as needed.
Create timer scripts
Create scripts that perform specific actions in Cortex XSIAM when a timer field times out.
When you create your scripts, the following arguments are automatically added, in addition to the basic elements provided with every script (for example, current investigation and current alert):
field
: The current triggered timer field object (contains: name,cliName
,threshold
and more.).fieldValue
: The current triggered timer field's value. For example thestartDate
.The following table lists the different properties in the SLA timer field value:
Property
Type
Description
dueDate
Date
The date the timer is due.
breachTriggered
Boolean
Whether the timer has timed out.
sla
INT (in minutes)
The time period for this timer. This is the value that you defined in the Timer field.
endDate
Date
The date the timer completed.
lastPauseDate
Date
The last date the timer was paused.
startDate
Date
The date at which the timer was started.
accumulatedPause
INT (in seconds)
The total number of seconds that the timer was in a paused state.
totalDuration
INT (in seconds)
The total number of seconds that the timer was running. This property is populated after the timer is stopped.
slaStatus
INT
Represents the Cortex XSIAM timerstatus. Values are:
-1
: The timer has not been set.0
: The timer is within the allotted range.1
: The timer is below the defined risk threshold.2
: The timer has timed out.
runStatus
String
Represents the current status of the timer. Values are:
idle
running
paused
ended