Automate changes to alert fields using timer scripts - Administrator Guide - Cortex XSIAM - Cortex - Security Operations

Cortex XSIAM Administrator Guide

Product
Cortex XSIAM
Creation date
2024-02-26
Last date published
2024-05-22
Category
Administrator Guide
Abstract

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
Abstract

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 the startDate.

    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