Create a custom widget using a script - Create a custom script based widget. Use custom widgets in dashboards and reports. - Administrator Guide - Cortex XSIAM - Cortex - Security Operations

Cortex XSIAM Documentation

Product
Cortex XSIAM
Creation date
2024-03-06
Last date published
2025-12-29
Category
Administrator Guide
Abstract

Create a custom script based widget. Use custom widgets in dashboards and reports.

You can use scripts in custom widgets to create dynamic widgets for more complex calculations and to present data from third-party systems.

For examples of creating widgets using scripts, see Script-based widget examples.

Before creating a script-based widget in the Widgets Library, you need to create or upload the script to the Scripts page. In the Widgets Library, you can change elements of the visual presentation.

Cortex XSIAM supports JavaScript, Python and PowerShell.

  1. Go to Incident ResponseAutomationScripts page to upload a script or create a new script for one of the following chart types:

    • Pie

    • Column

    • Line

    • Single Value

  2. In the Script Settings , add the widget tag to the script.

  3. Go to Dashboards & ReportsCustomizeWidget Library and create a script widget.

  4. Name the widget and select your script from the Scripts menu.

    Note

    If you have added arguments to the script, these appear when creating a widget.

  5. Run the script to view the results.

  6. Use the Chart Editor to choose the graph type and the subtype and to enable or disable the graph legend.

    Note

    Available options are Pie, Column, Line, and Single Value.

    To display the result of the script as a time duration, choose the graph type Single Value and enable Show as Time. You can then select the Time Unit (millisecond, second, minute, or hour) and the Display format.

  7. Add the script-based widget to a report or a dashboard.