Create script-based widgets
Create widgets that use scripts to retrieve and display data.
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. Because these widgets can contain unique logic or sensitive data queries, they are now managed as individual items with specific access rules.
How to create a script-based widget
Create the script: Select Investigation & Response → Automation → Scripts. You can upload an existing script or create a new one. Cortex XSIAM supports JavaScript, Python and PowerShell. You can create a script for one of the following chart types:
Pie
Column
Line
Single Value
Configure for the Widget Library: In the Script Settings, add the widget tag to the script. This tag ensures the script is recognized as a visualization tool and becomes available in the Widget Library.
Create the Custom Script Widget: Select Dashboards & Reports → Widget Library, click Create custom widget, and select Script.
Define the widget properties:
Name and Description: Give your widget a clear name so you can identify it later in the Widget Library.
Script: Select the script you created in step 1 from the list.
Set visibility: Use the Public widget toggle to determine how the widget appears in the Widget Library. Leave it unselected (default) to keep the widget Restricted (visible only to you) or select it to make the widget Public (visible to all users with Widget Library access).
Preview and save: Run a preview to ensure the script executes correctly and displays the data as intended, then click Save.
Configure the display (Chart Editor): Use the Chart Editor to choose the graph type and the subtype, and to enable or disable the graph legend.
Add to reports or dashboards: Once saved to the Widget Library, you can add this script-based widget to any custom dashboard or include it when building a report template.
Script-based widget examples
You can use script-based widgets to perform calculations on and visualize third-party data.
The following are sample Python scripts for the graph types Single Value, Pie, Line, and Column.
Last updated
Was this helpful?


